Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[Squash] Update tests
  • Loading branch information
jasnell committed Sep 6, 2017
commit b4a1075372b480523836ff14b414fc6d7cb76193
11 changes: 5 additions & 6 deletions test/async-hooks/test-embedder.api.async-resource.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,11 @@ const { checkInvocations } = require('./hook-checks');
const hooks = initHooks();
hooks.enable();

assert.throws(() => {
new AsyncResource();
}, common.expectsError({
code: 'ERR_ASYNC_TYPE',
type: TypeError,
}));
common.expectsError(
() => new AsyncResource(), {
code: 'ERR_INVALID_ARG_TYPE',
type: TypeError,
});
assert.throws(() => {
new AsyncResource('invalid_trigger_id', null);
}, common.expectsError({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ async_hooks.createHook({
assert.throws(() => {
return new AsyncResource();
}, common.expectsError({
code: 'ERR_ASYNC_TYPE',
code: 'ERR_INVALID_ARG_TYPE',
type: TypeError,
}));

Expand Down