Skip to content

Commit c470727

Browse files
committed
node: fix jest.rng.mjs on older node runtimes (NFC)
1 parent 0498089 commit c470727

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/node/jest.rng.mjs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ function getRandomSeed() {
55
}
66

77
export default function () {
8-
process.env.TEST_SEED ??= getRandomSeed();
8+
if (!process.env.TEST_SEED) {
9+
process.env.TEST_SEED = getRandomSeed();
10+
}
11+
912
console.log(`\n=== Using random seed ${process.env.TEST_SEED} ===`);
1013
}

0 commit comments

Comments
 (0)