There was an error while loading. Please reload this page.
1 parent 7d6afb3 commit 6d4731eCopy full SHA for 6d4731e
test/parallel/test-http2-perf_hooks.js
@@ -47,6 +47,14 @@ const obs = new PerformanceObserver(common.mustCall((items) => {
47
assert.fail('invalid entry name');
48
}
49
}, 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
58
obs.observe({ entryTypes: ['http2'] });
59
60
const body =
0 commit comments