0.0.1 • Published 9 years ago
jestification v0.0.1
jestification
Preprocessor for Jest
Installation
Install jestification and tsd
npm install --save-dev jestification tsd
Install the typings for jest
./node_modules/.bin/tsd install --save jest
Add the following jest configuration to your package.json
"jest": { "collectCoverage": true, "scriptPreprocessor": "<rootDir>/node_modules/jestification/preprocessor.js", "testDirectoryName": "tests", "testFileExtensions": [ "js", "jsx", "ts", "tsx" ], "unmockedModulePathPatterns": [ "<rootDir>/node_modules/react", "<rootDir>/node_modules/react-dom", "<rootDir>/node_modules/react-addons-test-utils", "<rootDir>/node_modules/fbjs" ] }
Make sure your scripts in package.json include
"scripts": { "postinstall": "tsd install", "test": "jest" }
Usage
Running tests is as simple as running the following command
npm test
0.0.1
9 years ago