Skip to content

Commit d307154

Browse files
author
cedric Madoerin
committed
fix(EventEmitter) pass null instead of obj for the test facebook#35577 facebook#36087
1 parent ab5e2e8 commit d307154

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Libraries/vendor/emitter/__tests__/EventEmitter-test.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,8 @@ describe('listeners', () => {
8080

8181
it('registers an event with an illegal argument', () => {
8282
const emitter = new EventEmitter<{A: []}>();
83-
const fakeFunction = ({}: any);
8483

85-
expect(() => emitter.addListener('A', fakeFunction)).toThrow(
84+
expect(() => emitter.addListener('A', null)).toThrow(
8685
'EventEmitter.addListener(…): 2nd argument must be a function.',
8786
);
8887
});

0 commit comments

Comments
 (0)