mirror of
https://github.com/denoland/deno.git
synced 2024-12-26 17:19:06 -05:00
parent
3be2064803
commit
dd59bf5fc3
1 changed files with 8 additions and 1 deletions
|
@ -45,7 +45,14 @@ unitTest(function performanceMeasure() {
|
|||
assertEquals(measure.entryType, "measure");
|
||||
assert(measure.startTime > 0);
|
||||
assertEquals(mark.startTime, measure.startTime);
|
||||
assert(measure.duration >= 100 && measure.duration < 200);
|
||||
assert(
|
||||
measure.duration >= 100,
|
||||
`duration below 100ms: ${measure.duration}`
|
||||
);
|
||||
assert(
|
||||
measure.duration < 500,
|
||||
`duration exceeds 500ms: ${measure.duration}`
|
||||
);
|
||||
const entries = performance.getEntries();
|
||||
assert(entries[entries.length - 1] === measure);
|
||||
const measureEntries = performance.getEntriesByName("test", "measure");
|
||||
|
|
Loading…
Reference in a new issue