@@ -16,13 +16,11 @@ jest.mock('isEventSupported');
1616describe ( 'EventPluginHub' , ( ) => {
1717 var React ;
1818 var ReactTestUtils ;
19- var ReactDOMFeatureFlags ;
2019
2120 beforeEach ( ( ) => {
2221 jest . resetModules ( ) ;
2322 React = require ( 'react' ) ;
2423 ReactTestUtils = require ( 'react-dom/test-utils' ) ;
25- ReactDOMFeatureFlags = require ( 'ReactDOMFeatureFlags' ) ;
2624 } ) ;
2725
2826 it ( 'should prevent non-function listeners, at dispatch' , ( ) => {
@@ -35,14 +33,10 @@ describe('EventPluginHub', () => {
3533 } ) . toThrowError (
3634 'Expected `onClick` listener to be a function, instead got a value of `string` type.' ,
3735 ) ;
38- if ( ReactDOMFeatureFlags . useFiber ) {
39- expectDev ( console . error . calls . count ( ) ) . toBe ( 1 ) ;
40- expectDev ( console . error . calls . argsFor ( 0 ) [ 0 ] ) . toContain (
41- 'Expected `onClick` listener to be a function, instead got a value of `string` type.' ,
42- ) ;
43- } else {
44- expectDev ( console . error . calls . count ( ) ) . toBe ( 0 ) ;
45- }
36+ expectDev ( console . error . calls . count ( ) ) . toBe ( 1 ) ;
37+ expectDev ( console . error . calls . argsFor ( 0 ) [ 0 ] ) . toContain (
38+ 'Expected `onClick` listener to be a function, instead got a value of `string` type.' ,
39+ ) ;
4640 } ) ;
4741
4842 it ( 'should not prevent null listeners, at dispatch' , ( ) => {
0 commit comments