Start up a new project with Create React App (CRA) 2, add some TS components and yay it all works out the box! 🙌 … Add some Lottie and you will likely hit a wall where you want more control over the jest config.
Do you eject? NO! To the rescue: Rescripts 🎉
Here’s how to make it happen
- Install rescripts:
2. Update your package.json scripts:
.rescriptsrc.js to the root of your project:
- note you can include any jest config you need — the above is just what I required to get jest to play nice with lottie.
And we are done! Run
yarn test to kick things off 🙌
Think you’ve got that it takes to join Team SovTech? Get in touch.