create-react-app-typescript
create-react-app-typescript copied to clipboard
ts-jest and moduleNameMapper after migrating from create-react-app to create-react-app-typescript
Is this a bug report?
Yes
Can you also reproduce the problem with npm 4.x?
No, haven't tried,
Environment
npm ls react-scripts-ts(if you haven’t ejected): [email protected]node -v: v8.11.3npm -v: v6.4.0
Then, specify:
- Operating system: Windows
Steps to Reproduce
(Write your steps here:)
- Create app with create-react-app
- Follow this guide to migrate to create-react-app-typescript
- Convert a few files to
.ts, Add some basic path mapping totsconfig.json npm test
Expected Behavior
Tests pass.
Actual Behavior
Tests fail with Could not locate module.
Attempting to add entries into moduleNameMapper in package.json causes npm test to complain about moduleNameMapper not being a supported option with create-react-app, tells me to eject.
Reproducible Demo
Nothing yet, will put something together this weekend.