node/test/addons/callback-scope/test-resolve-async.js
Sho Miyamoto c84582cbb6
test: add common.crashOnUnhandledRejection to addons/callback-scope
PR-URL: https://github.com/nodejs/node/pull/18076
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
2018-01-13 14:50:30 -08:00

13 lines
343 B
JavaScript

'use strict';
const common = require('../../common');
const assert = require('assert');
const { testResolveAsync } = require(`./build/${common.buildType}/binding`);
common.crashOnUnhandledRejection();
let called = false;
testResolveAsync().then(() => { called = true; });
setTimeout(() => { assert(called); }, common.platformTimeout(50));