Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
beee248
Add base implementation of React Fire
trueadm Dec 3, 2018
5904745
revert results.json
trueadm Dec 5, 2018
d3c611a
Don't prompt to tag or create GitHub release for canary releases (#14…
bvaughn Dec 3, 2018
465b2d8
Prevent a v8 deopt when profiling (#14383)
bvaughn Dec 3, 2018
b629bee
Fix scheduler setTimeout() re-entrancy check (#14384)
bvaughn Dec 3, 2018
839db36
fix spelling error: differen -> different (#14378)
AGCB Dec 4, 2018
36e1eb5
Tweaked wording for v8 "performance cliff" issue
Dec 4, 2018
9b1d9e1
Enable hooks in fabric (#14301)
sahrens Dec 5, 2018
e42f14f
TestRenderer toJSON should not expose the Array wrapper Suspense uses…
bvaughn Dec 5, 2018
fca0db0
Revert ReactDOM
trueadm Dec 5, 2018
a0b8923
Fix tests + Flow issues + lint issues
trueadm Dec 5, 2018
24c2bae
Fix merge conflicts
trueadm Dec 14, 2018
f480a35
Fix lint warnings
trueadm Dec 14, 2018
bb08494
Fix internal tests
trueadm Dec 14, 2018
a7167d4
Fix conflict
trueadm Dec 17, 2018
37b8747
ignore onResize
trueadm Dec 19, 2018
08a82c6
Revised event checking against whitelist
trueadm Dec 19, 2018
c2757fe
fix bug in isPropEvent
trueadm Dec 20, 2018
1626712
fix isPropagationStopped for FB
trueadm Dec 20, 2018
0b221ce
remove console.log
trueadm Dec 20, 2018
e02b30f
add missing flow type
trueadm Dec 20, 2018
153a194
slight code size win
trueadm Dec 20, 2018
a0a64ed
Fix prettier
trueadm Dec 20, 2018
7d87d40
add Keyboard event key field normalization
trueadm Jan 3, 2019
013e719
Fix prettier
trueadm Jan 3, 2019
0f1e79f
WIP - re-add synthetic events
trueadm Jan 7, 2019
053f29a
Fix typo in SyntheticEvent
trueadm Jan 7, 2019
dd37457
Fix flow + prettier
trueadm Jan 7, 2019
21a13b8
Fix prod tests
trueadm Jan 7, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
"@mattiasbuelens/web-streams-polyfill": "0.1.0"
},
"devEngines": {
"node": "8.x || 9.x || 10.x"
"node": "8.x || 9.x || 10.x || 11.x"
},
"jest": {
"testRegex": "/scripts/jest/dont-run-jest-directly\\.js$"
Expand All @@ -104,6 +104,8 @@
"test-fire": "cross-env NODE_ENV=development jest --config ./scripts/jest/config.source-fire.js",
"test-prod": "cross-env NODE_ENV=production jest --config ./scripts/jest/config.source.js",
"test-fire-prod": "cross-env NODE_ENV=production jest --config ./scripts/jest/config.source-fire.js",
"debug-test-fire": "cross-env NODE_ENV=development node --inspect-brk node_modules/.bin/jest --config ./scripts/jest/config.source-fire.js --runInBand",
"debug-test-fire-prod": "cross-env NODE_ENV=production node --inspect-brk node_modules/.bin/jest --config ./scripts/jest/config.source-fire.js --runInBand",
"test-prod-build": "yarn test-build-prod",
"test-build": "cross-env NODE_ENV=development jest --config ./scripts/jest/config.build.js",
"test-build-prod": "cross-env NODE_ENV=production jest --config ./scripts/jest/config.build.js",
Expand Down
59 changes: 33 additions & 26 deletions packages/react-dom/src/__tests__/EventPluginHub-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,36 +9,43 @@

'use strict';

let ReactFeatureFlags = require('shared/ReactFeatureFlags');

jest.mock('../events/isEventSupported');

describe('EventPluginHub', () => {
let React;
let ReactTestUtils;
// Much of this logic was removed with Fire
if (ReactFeatureFlags.enableReactDOMFire) {
it('Empty test', () => {});
} else {
describe('EventPluginHub', () => {
let React;
let ReactTestUtils;

beforeEach(() => {
jest.resetModules();
React = require('react');
ReactTestUtils = require('react-dom/test-utils');
});
beforeEach(() => {
jest.resetModules();
React = require('react');
ReactTestUtils = require('react-dom/test-utils');
});

it('should prevent non-function listeners, at dispatch', () => {
let node;
expect(() => {
node = ReactTestUtils.renderIntoDocument(
<div onClick="not a function" />,
it('should prevent non-function listeners, at dispatch', () => {
let node;
expect(() => {
node = ReactTestUtils.renderIntoDocument(
<div onClick="not a function" />,
);
}).toWarnDev(
'Expected `onClick` listener to be a function, instead got a value of `string` type.',
);
}).toWarnDev(
'Expected `onClick` listener to be a function, instead got a value of `string` type.',
);
expect(() => ReactTestUtils.SimulateNative.click(node)).toThrowError(
'Expected `onClick` listener to be a function, instead got a value of `string` type.',
);
});
expect(() => ReactTestUtils.SimulateNative.click(node)).toThrowError(
'Expected `onClick` listener to be a function, instead got a value of `string` type.',
);
});

it('should not prevent null listeners, at dispatch', () => {
const node = ReactTestUtils.renderIntoDocument(<div onClick={null} />);
expect(function() {
ReactTestUtils.SimulateNative.click(node);
}).not.toThrow();
it('should not prevent null listeners, at dispatch', () => {
const node = ReactTestUtils.renderIntoDocument(<div onClick={null} />);
expect(function() {
ReactTestUtils.SimulateNative.click(node);
}).not.toThrow();
});
});
});
}
Loading