Skip to content

Commit

Permalink
Fix up tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gaearon committed Nov 29, 2017
1 parent 9f5b0e3 commit 6e2bca3
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,21 @@ describe('ReactBrowserEventEmitter', () => {

idCallOrder = [];
tapMoveThreshold = TapEventPlugin.tapMoveThreshold;
spyOnDev(console, 'warn');
EventPluginHub.injection.injectEventPluginsByName({
TapEventPlugin: TapEventPlugin,
});
});

afterEach(() => {
if (__DEV__) {
expect(console.warn.calls.count()).toBe(1);
expect(console.warn.calls.argsFor(0)[0]).toContain(
'Injecting custom event plugins (TapEventPlugin) is deprecated',
);
}
});

it('should store a listener correctly', () => {
registerSimpleTestHandler();
var listener = getListener(CHILD, ON_CLICK_KEY);
Expand Down

0 comments on commit 6e2bca3

Please sign in to comment.