Skip to content

Commit 71daa13

Browse files
test(p2-shim): avoid tight monotonic test in CI
1 parent 0bad269 commit 71daa13

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/preview2-shim/test/test.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { env } from "node:process";
12
import {
23
throws
34
} from "node:assert";
@@ -76,7 +77,7 @@ suite("Node.js Preview2", () => {
7677
// verify we are at the right time, and within 1ms of the original now
7778
const nextNow = monotonicClock.now();
7879
assert.ok(nextNow - curNow >= 10e6);
79-
assert.ok(nextNow - curNow < 15e6);
80+
if (!env.CI) { assert.ok(nextNow - curNow < 15e6); }
8081
});
8182

8283
test("Monotonic clock subscribe instant", async () => {
@@ -92,7 +93,7 @@ suite("Node.js Preview2", () => {
9293
// verify we are at the right time, and within 1ms of the original now
9394
const nextNow = monotonicClock.now();
9495
assert.ok(nextNow - curNow >= 10e6);
95-
assert.ok(nextNow - curNow < 15e6);
96+
if (!env.CI) { assert.ok(nextNow - curNow < 15e6); }
9697
});
9798
});
9899

0 commit comments

Comments
 (0)