mirror of
https://github.com/nodejs/node.git
synced 2025-05-03 16:34:41 +00:00

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: https://github.com/nodejs/node/pull/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>
15 lines
291 B
JavaScript
15 lines
291 B
JavaScript
'use strict';
|
|
|
|
const common = require('../../common');
|
|
|
|
const binding = require(`./build/${common.buildType}/binding`);
|
|
|
|
// Create an AsyncWrap object.
|
|
const timer = setTimeout(common.mustNotCall(), 1);
|
|
timer.unref();
|
|
|
|
// Stress-test the heap profiler.
|
|
binding.test();
|
|
|
|
clearTimeout(timer);
|