Skip to content
Merged
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
add more invalid data types to test case
  • Loading branch information
deokjinkim committed Sep 20, 2023
commit 0fd49f1d5e0f8425b6c81d1f34c07b4b2befd83f
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