Skip to content

Commit

Permalink
qe: Fix test runner under Node 20 (#4642)
Browse files Browse the repository at this point in the history
`crypto` global is already defined on Node 20+ and can not be overriden.

Close prisma/team-orm##798
  • Loading branch information
SevInf authored Jan 12, 2024
1 parent ef81bd2 commit 85c1f86
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion query-engine/driver-adapters/executor/src/testd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,13 @@ import { Client as PlanetscaleClient } from '@planetscale/database'
import { PrismaPlanetScale } from '@prisma/adapter-planetscale'



import {bindAdapter, DriverAdapter, ErrorCapturingDriverAdapter} from "@prisma/driver-adapter-utils";
import { webcrypto } from 'node:crypto';

(global as any).crypto = webcrypto
if (!global.crypto) {
global.crypto = webcrypto as Crypto
}


const SUPPORTED_ADAPTERS: Record<string, (_ : string) => Promise<DriverAdapter>>
Expand Down

0 comments on commit 85c1f86

Please sign in to comment.