Skip to content

React hooks test cases part 1 -- useLayoutEffect#2121

Merged
ljharb merged 1 commit into
enzymejs:masterfrom
chenesan:react-hooks-use-layout-effect
May 11, 2019
Merged

React hooks test cases part 1 -- useLayoutEffect#2121
ljharb merged 1 commit into
enzymejs:masterfrom
chenesan:react-hooks-use-layout-effect

Conversation

@chenesan

Copy link
Copy Markdown
Contributor

Related to #2011 .

Added useLayoutEffect tests with almost the same flow except that the component using useLayoutEffect instead useEffect.

The shallow test is also skipped due to react/react#15275 . After that resolves we should reopen those skipped tests.

Also reset the timeout of setTimeout in test from 1e3 to 100 -- hope to make tests a little sooner.

Also reduce the timeout from 1e3 to 100.

Skip shallow tests until [shallow renderer can run useEffect](react/react#15275) is fixed.
@chenesan chenesan mentioned this pull request May 11, 2019
14 tasks
Comment thread packages/enzyme-test-suite/test/ReactWrapper-spec.jsx
Comment thread packages/enzyme-test-suite/test/ShallowWrapper-spec.jsx Outdated
@ljharb
ljharb force-pushed the react-hooks-use-layout-effect branch from 3d0983b to 1b85181 Compare May 11, 2019 02:48
@ljharb
ljharb merged commit 1b85181 into enzymejs:master May 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants