mirror of
https://github.com/oven-sh/bun
synced 2026-02-02 15:08:46 +00:00
deflake process.test.js
This commit is contained in:
@@ -118,11 +118,15 @@ it("process.chdir() on root dir", () => {
|
||||
}
|
||||
});
|
||||
|
||||
it("process.hrtime()", () => {
|
||||
it("process.hrtime()", async () => {
|
||||
const start = process.hrtime();
|
||||
const end = process.hrtime(start);
|
||||
const end2 = process.hrtime();
|
||||
expect(end[0]).toBe(0);
|
||||
|
||||
// Flaky on Ubuntu.
|
||||
await Bun.sleep(0);
|
||||
const end2 = process.hrtime();
|
||||
|
||||
expect(end2[1] > start[1]).toBe(true);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user