Skip to content

Commit

Permalink
do not test built-in error messages in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Atrue committed Feb 7, 2023
1 parent 15b2439 commit 216fcf1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/unit/factory.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { createEvent, createMessageEvent, createCloseEvent } from '../../src/eve
const fakeObject = { foo: 'bar' };

test('that the create methods throw errors if no type if specified', t => {
t.throws(() => createEvent(), "Cannot read property 'type' of undefined");
t.throws(() => createMessageEvent(), "Cannot read property 'type' of undefined");
t.throws(() => createEvent(), error => error.name === 'TypeError');
t.throws(() => createMessageEvent(), error => error.name === 'TypeError');
});

test('that createEvent correctly creates an event', t => {
Expand Down

0 comments on commit 216fcf1

Please sign in to comment.