0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00

async_wrap: add a missing case to test-async-wrap-throw-no-init

PR-URL: https://github.com/nodejs/node/pull/8198
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
This commit is contained in:
yorkie 2016-08-20 21:37:59 +08:00
parent f2fe5583c4
commit 10b3f131c2

View File

@ -4,11 +4,14 @@ require('../common');
const assert = require('assert');
const async_wrap = process.binding('async_wrap');
assert.throws(function() {
async_wrap.setupHooks(null);
}, /first argument must be an object/);
assert.throws(function() {
async_wrap.setupHooks({});
}, /init callback must be a function/);
assert.throws(function() {
async_wrap.enable();
}, /init callback is not assigned to a function/);