@@ -16,13 +16,11 @@ jest.mock('isEventSupported');
16
16
describe ( 'EventPluginHub' , ( ) => {
17
17
var React ;
18
18
var ReactTestUtils ;
19
- var ReactDOMFeatureFlags ;
20
19
21
20
beforeEach ( ( ) => {
22
21
jest . resetModules ( ) ;
23
22
React = require ( 'react' ) ;
24
23
ReactTestUtils = require ( 'react-dom/test-utils' ) ;
25
- ReactDOMFeatureFlags = require ( 'ReactDOMFeatureFlags' ) ;
26
24
} ) ;
27
25
28
26
it ( 'should prevent non-function listeners, at dispatch' , ( ) => {
@@ -35,14 +33,10 @@ describe('EventPluginHub', () => {
35
33
} ) . toThrowError (
36
34
'Expected `onClick` listener to be a function, instead got a value of `string` type.' ,
37
35
) ;
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
+ ) ;
46
40
} ) ;
47
41
48
42
it ( 'should not prevent null listeners, at dispatch' , ( ) => {
0 commit comments