Skip to content

Commit 50e42c9

Browse files
juanarbolBridgeAR
authored andcommitted
test: improve test coverage in perf_hooks
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]>
1 parent a41138b commit 50e42c9

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/parallel/test-http2-perf_hooks.js

+8
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,14 @@ const obs = new PerformanceObserver(common.mustCall((items) => {
4747
assert.fail('invalid entry name');
4848
}
4949
}, 4));
50+
51+
// Should throw if entryTypes are not valid
52+
{
53+
const expectedError = { code: 'ERR_VALID_PERFORMANCE_ENTRY_TYPE' };
54+
const wrongEntryTypes = { entryTypes: ['foo', 'bar', 'baz'] };
55+
assert.throws(() => obs.observe(wrongEntryTypes), expectedError);
56+
}
57+
5058
obs.observe({ entryTypes: ['http2'] });
5159

5260
const body =

0 commit comments

Comments
 (0)