mirror of
https://github.com/denoland/deno.git
synced 2025-08-03 10:33:54 +00:00
refactor(cli/tests): replace createResolvable with deferred (#8507)
This commit is contained in:
parent
2031418a24
commit
e6685f0f01
9 changed files with 64 additions and 114 deletions
|
@ -3,14 +3,14 @@ import {
|
|||
assert,
|
||||
assertEquals,
|
||||
assertThrows,
|
||||
createResolvable,
|
||||
deferred,
|
||||
unitTest,
|
||||
} from "./test_util.ts";
|
||||
|
||||
unitTest({ perms: { hrtime: false } }, async function performanceNow(): Promise<
|
||||
void
|
||||
> {
|
||||
const resolvable = createResolvable();
|
||||
const resolvable = deferred();
|
||||
const start = performance.now();
|
||||
setTimeout((): void => {
|
||||
const end = performance.now();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue