Skip to content

Commit

Permalink
test: cover node entry type in perf_hooks
Browse files Browse the repository at this point in the history
PR-URL: #32751
Reviewed-By: Adrian Estrada <edsadr@gmail.com>
Reviewed-By: Zeyu Yang <himself65@outlook.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
julianduque authored and BridgeAR committed Apr 28, 2020
1 parent 2f7e372 commit f1273e8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/parallel/test-performanceobserver.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit f1273e8

Please sign in to comment.