You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 5, 2021. It is now read-only.
While the typewiz-jest work (#49) is baking, I was seeing if there was a quick path to getting typewiz instrumentation in jest for create-react-app specifically. I tried registering typewiz-node before jest.run(), but no luck. I was curious if you had some ideas here, in case you have already looked at how to make jest work.
I've created new branches in the following two repos, under the typewiz-jest branch:
cd react-scripts-ts
git checkout typewiz-jest
yarn link
yarn install
cd ../cra-typewiz-example
git checkout typewiz-jest
yarn link react-scripts-ts
yarn install
CI=true yarn react-scripts-ts test --runInBand --env=jsdom hello-spec
The final line runs tests without watcher mode (CI=true), and runs tests serially with --runInBand (to prevent forking). I verified that the test is running in the same process as the one that called require('typewiz-node/dist/register'), but still no luck!
As another approach, I also simply tried registering typewiz-node from within src/setupTests.ts, but that causes jest to spit errors about receiving Typescript rather than Javascript....
The text was updated successfully, but these errors were encountered:
As far as I can remember, I had the exact same issue when I tried to get #49 to work. I hope to find some time later this week to look at the production you created and see if I can help in any way
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
While the typewiz-jest work (#49) is baking, I was seeing if there was a quick path to getting typewiz instrumentation in jest for create-react-app specifically. I tried registering typewiz-node before jest.run(), but no luck. I was curious if you had some ideas here, in case you have already looked at how to make jest work.
I've created new branches in the following two repos, under the typewiz-jest branch:
To repro:
The final line runs tests without watcher mode (CI=true), and runs tests serially with --runInBand (to prevent forking). I verified that the test is running in the same process as the one that called require('typewiz-node/dist/register'), but still no luck!
As another approach, I also simply tried registering typewiz-node from within src/setupTests.ts, but that causes jest to spit errors about receiving Typescript rather than Javascript....
The text was updated successfully, but these errors were encountered: