Skip to content

Commit

Permalink
test: add not-called check to heap-profiler test
Browse files Browse the repository at this point in the history
Add `common.mustNotCall()` to make sure there aren't any strange
shenanians in the C++ test that would cause the function to execute when
it shouldn't.

PR-URL: #12985
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
Trott authored and MylesBorins committed Jul 11, 2017
1 parent 2451665 commit c10525c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/addons/heap-profiler/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const common = require('../../common');
const binding = require(`./build/${common.buildType}/binding`);

// Create an AsyncWrap object.
const timer = setTimeout(function() {}, 1);
const timer = setTimeout(common.mustNotCall(), 1);
timer.unref();

// Stress-test the heap profiler.
Expand Down

0 comments on commit c10525c

Please sign in to comment.