Skip to content

Commit

Permalink
test: improve test coverage in perf_hooks
Browse files Browse the repository at this point in the history
PR-URL: #26290
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Anto Aravinth <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
  • Loading branch information
juanarbol authored and BethGriggs committed Apr 16, 2019
1 parent 7d6afb3 commit 6d4731e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/parallel/test-http2-perf_hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,14 @@ const obs = new PerformanceObserver(common.mustCall((items) => {
assert.fail('invalid entry name');
}
}, 4));

// Should throw if entryTypes are not valid
{
const expectedError = { code: 'ERR_VALID_PERFORMANCE_ENTRY_TYPE' };
const wrongEntryTypes = { entryTypes: ['foo', 'bar', 'baz'] };
assert.throws(() => obs.observe(wrongEntryTypes), expectedError);
}

obs.observe({ entryTypes: ['http2'] });

const body =
Expand Down

0 comments on commit 6d4731e

Please sign in to comment.