Skip to content

Commit

Permalink
test: make test-eventemitter-asyncresource.js shorter
Browse files Browse the repository at this point in the history
Signed-off-by: Juan José Arboleda <soyjuanarbol@gmail.com>
  • Loading branch information
juanarbol committed Oct 24, 2022
1 parent aab9f32 commit 9dd5cc2
Showing 1 changed file with 6 additions and 14 deletions.
20 changes: 6 additions & 14 deletions test/parallel/test-eventemitter-asyncresource.js
Expand Up @@ -143,17 +143,9 @@ throws(
{ code: 'ERR_INVALID_THIS' }
);

throws(
() => Reflect.get(EventEmitterAsyncResource.prototype, 'asyncId', {}),
{ code: 'ERR_INVALID_THIS' }
);

throws(
() => Reflect.get(EventEmitterAsyncResource.prototype, 'triggerAsyncId', {}),
{ code: 'ERR_INVALID_THIS' }
);

throws(
() => Reflect.get(EventEmitterAsyncResource.prototype, 'asyncResource', {}),
{ code: 'ERR_INVALID_THIS' }
);
['asyncId', 'triggerAsyncId', 'asyncResource'].forEach((member) => {
throws(
() => Reflect.get(EventEmitterAsyncResource.prototype, member, {}),
{ code: 'ERR_INVALID_THIS' }
);
})

0 comments on commit 9dd5cc2

Please sign in to comment.