summaryrefslogtreecommitdiff
path: root/test/parallel/test-event-emitter-emit-context.js
diff options
context:
space:
mode:
authorJordan Harband <ljharb@gmail.com>2023-01-09 21:38:36 -0800
committerGitHub <noreply@github.com>2023-01-10 05:38:36 +0000
commit757c10414776b6f035ced453599527a841f47d6e (patch)
tree8d51c5c789eb6832ab71a5cde64813c71a4f8879 /test/parallel/test-event-emitter-emit-context.js
parent5d9a9a6ba323916a978e737e6cee73c6df956afa (diff)
downloadnode-new-757c10414776b6f035ced453599527a841f47d6e.tar.gz
tools: add `prefer-proto` rule
fixup: add support for `Object.create(null)` fixup: extend to any 1-argument Object.create call fixup: add tests PR-URL: https://github.com/nodejs/node/pull/46083 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Michaƫl Zasso <targos@protonmail.com> Reviewed-By: Jacob Smith <jacob@frende.me> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Diffstat (limited to 'test/parallel/test-event-emitter-emit-context.js')
-rw-r--r--test/parallel/test-event-emitter-emit-context.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/parallel/test-event-emitter-emit-context.js b/test/parallel/test-event-emitter-emit-context.js
index 82e4b59518..e4c73cadc5 100644
--- a/test/parallel/test-event-emitter-emit-context.js
+++ b/test/parallel/test-event-emitter-emit-context.js
@@ -8,7 +8,7 @@ const EE = new EventEmitter();
// Works as expected if the context has no `constructor.name`
{
- const ctx = Object.create(null);
+ const ctx = { __proto__: null };
assert.throws(
() => EE.emit.call(ctx, 'error', new Error('foo')),
common.expectsError({ name: 'Error', message: 'foo' })