From ead51be541ca2ea94b59b090914cf25eafd62b79 Mon Sep 17 00:00:00 2001 From: Julian Duque Date: Thu, 9 Apr 2020 22:50:16 -0400 Subject: [PATCH] test: cover node entry type in perf_hooks PR-URL: https://github.com/nodejs/node/pull/32751 Reviewed-By: Adrian Estrada Reviewed-By: Zeyu Yang Reviewed-By: Luigi Pinca --- test/parallel/test-performanceobserver.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/parallel/test-performanceobserver.js b/test/parallel/test-performanceobserver.js index 01afbdc6aaf4b2..c68de859b6b654 100644 --- a/test/parallel/test-performanceobserver.js +++ b/test/parallel/test-performanceobserver.js @@ -88,8 +88,10 @@ assert.strictEqual(counts[NODE_PERFORMANCE_ENTRY_TYPE_FUNCTION], 0); countdown.dec(); } assert.strictEqual(counts[NODE_PERFORMANCE_ENTRY_TYPE_MARK], 0); - observer.observe({ entryTypes: ['mark'] }); + assert.strictEqual(counts[NODE_PERFORMANCE_ENTRY_TYPE_NODE], 0); + observer.observe({ entryTypes: ['mark', 'node'] }); assert.strictEqual(counts[NODE_PERFORMANCE_ENTRY_TYPE_MARK], 1); + assert.strictEqual(counts[NODE_PERFORMANCE_ENTRY_TYPE_NODE], 1); performance.mark('test1'); performance.mark('test2'); performance.mark('test3');