mirror of https://github.com/lukechilds/node.git
Browse Source
Test more current behaviour, based on discussions in https://github.com/nodejs/node/pull/14697. PR-URL: https://github.com/nodejs/node/pull/14922 Reviewed-By: Trevor Norris <trev.norris@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>canary-base
4 changed files with 36 additions and 5 deletions
@ -0,0 +1,9 @@ |
|||
'use strict'; |
|||
const common = require('../../common'); |
|||
const { runMakeCallback } = require(`./build/${common.buildType}/binding`); |
|||
|
|||
process.on('uncaughtException', common.mustCall()); |
|||
|
|||
runMakeCallback(5, common.mustCall(() => { |
|||
throw new Error('foo'); |
|||
})); |
@ -0,0 +1,10 @@ |
|||
'use strict'; |
|||
const common = require('../../common'); |
|||
const assert = require('assert'); |
|||
const { runMakeCallback } = require(`./build/${common.buildType}/binding`); |
|||
|
|||
runMakeCallback(5, common.mustCall(function(err, val) { |
|||
assert.strictEqual(err, null); |
|||
assert.strictEqual(val, 10); |
|||
process.nextTick(common.mustCall()); |
|||
})); |
Loading…
Reference in new issue