Skip to content

Commit

Permalink
add more invalid data types to test case
Browse files Browse the repository at this point in the history
  • Loading branch information
deokjinkim committed Sep 20, 2023
1 parent 55d1bc4 commit 0fd49f1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion test/parallel/test-events-on-async-iterator.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ async function invalidArgType() {

const ee = new EventEmitter();

[1, 'hi', null, false].map((options) => {
[1, 'hi', null, false, () => {}, Symbol(), 1n].map((options) => {
return assert.throws(() => on(ee, 'foo', options), common.expectsError({
code: 'ERR_INVALID_ARG_TYPE',
name: 'TypeError',
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-events-once.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ async function onceAnEvent() {
async function onceAnEventWithInvalidOptions() {
const ee = new EventEmitter();

await Promise.all([1, 'hi', null, false].map((options) => {
await Promise.all([1, 'hi', null, false, () => {}, Symbol(), 1n].map((options) => {
return rejects(once(ee, 'myevent', options), {
code: 'ERR_INVALID_ARG_TYPE',
});
Expand Down

0 comments on commit 0fd49f1

Please sign in to comment.