Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 50e42c9

Browse filesBrowse files
juanarbolBridgeAR
authored andcommitted
test: improve test coverage in perf_hooks
PR-URL: #26290 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
1 parent a41138b commit 50e42c9
Copy full SHA for 50e42c9

File tree

Expand file treeCollapse file tree

1 file changed

+8
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+8
-0
lines changed
Open diff view settings
Collapse file

‎test/parallel/test-http2-perf_hooks.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-http2-perf_hooks.js
+8Lines changed: 8 additions & 0 deletions
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.