@alot/jest-preset
v1.3.4
Published
A TypeScript and Babel Jest preset for React Native.
Downloads
18
Readme
@alot/jest-preset
Test your code using Jest with tests written in TypeScript.
Usage
Add as a dependency:
yarn add --dev @alot/jest-preset
Create a
tsconfig.json
configuration in your app root if you haven't already, for example:{ "compilerOptions": { "target": "es2015", "jsx": "react", "noEmit": true, "moduleResolution": "node" }, "exclude": [ "node_modules" ] }
Modify your
package.json
or other Jest configuration to use this preset:
package.json
example:
{
+ "jest": {
+ "preset": "@alot/jest-preset",
+ ...
}
```
4. That's it!