Skip to content

Commit 0fd49f1

Browse files
committed
add more invalid data types to test case
1 parent 55d1bc4 commit 0fd49f1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

test/parallel/test-events-on-async-iterator.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ async function invalidArgType() {
4343

4444
const ee = new EventEmitter();
4545

46-
[1, 'hi', null, false].map((options) => {
46+
[1, 'hi', null, false, () => {}, Symbol(), 1n].map((options) => {
4747
return assert.throws(() => on(ee, 'foo', options), common.expectsError({
4848
code: 'ERR_INVALID_ARG_TYPE',
4949
name: 'TypeError',

test/parallel/test-events-once.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ async function onceAnEvent() {
2727
async function onceAnEventWithInvalidOptions() {
2828
const ee = new EventEmitter();
2929

30-
await Promise.all([1, 'hi', null, false].map((options) => {
30+
await Promise.all([1, 'hi', null, false, () => {}, Symbol(), 1n].map((options) => {
3131
return rejects(once(ee, 'myevent', options), {
3232
code: 'ERR_INVALID_ARG_TYPE',
3333
});

0 commit comments

Comments
 (0)