mirror of
https://github.com/nodejs/node.git
synced 2025-05-10 19:17:56 +00:00

With `CallbackScope`, this has become possible to do properly. Fixes: https://github.com/nodejs/node/issues/5691 PR-URL: https://github.com/nodejs/node/pull/14697 Reviewed-By: James M Snell <jasnell@gmail.com>
14 lines
353 B
JavaScript
14 lines
353 B
JavaScript
'use strict';
|
|
|
|
const common = require('../../common');
|
|
const assert = require('assert');
|
|
const { testResolveAsync } = require(`./build/${common.buildType}/binding`);
|
|
|
|
let called = false;
|
|
testResolveAsync().then(common.mustCall(() => {
|
|
called = true;
|
|
}));
|
|
|
|
setTimeout(common.mustCall(() => { assert(called); }),
|
|
common.platformTimeout(20));
|