-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Description
🐛 Bug Report
I wanted to try my luck and see whether I'd be able to fix an issue in this repo but couldn't get the environment to run.
More specifically when running yarn test the tests won't finish.
when running yarn test --testPathPattern useTransition
this is the output:
yarn test --testPathPattern useTransition
yarn run v1.22.10
$ jest --testPathPattern useTransition
console.error
This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning.
at enqueueTask (src/hooks/packages/core/node_modules/@testing-library/react/dist/@testing-library/react.esm.js:43:15)
at Object.then (src/hooks/packages/core/node_modules/@testing-library/react/dist/@testing-library/react.esm.js:51:7)
console.error
Warning: An update to null inside a test was not wrapped in act(...).
When testing, code that causes React state updates should be wrapped into act(...):
act(() => {
/* fire events that update state */
});
/* assert on the output */
This ensures that you're testing the behavior the user would see in the browser. Learn more at https://fb.me/react-wrap-tests-with-act
in Unknown
at printWarning (src/hooks/packages/core/node_modules/react-dom/cjs/react-dom.development.js:88:30)
at error (src/hooks/packages/core/node_modules/react-dom/cjs/react-dom.development.js:60:5)
at warnIfNotCurrentlyActingUpdatesInDEV (src/hooks/packages/core/node_modules/react-dom/cjs/react-dom.development.js:23284:7)
at dispatchAction (src/hooks/packages/core/node_modules/react-dom/cjs/react-dom.development.js:15656:9)
at src/hooks/packages/shared/src/hooks/useForceUpdate.ts:11:7
at payload.onResolve (src/hooks/packages/core/src/hooks/useTransition.tsx:257:11)
at src/hooks/packages/core/src/Controller.ts:407:30
RUNS packages/core/src/hooks/useTransition.test.tsx
To reproduce:
- checkout v9 branch
- yarn install
- yarn test --testPathPattern useTransition
Environment
react-springtoday's fork of v9macOS0.15.7nodev14.15.4yarn1.22.10
tomdohnal
Metadata
Metadata
Assignees
Labels
kind: bugSomething isn't workingSomething isn't working