Skip to content

Commit

Permalink
Sets root dir for jest. Adds test watch command
Browse files Browse the repository at this point in the history
  • Loading branch information
coconutcraig committed Nov 15, 2018
1 parent 45e4bef commit 0c77118
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
12 changes: 11 additions & 1 deletion jestconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
{
"roots": [
"<rootDir>/src"
],
"transform": {
"^.+\\.(t|j)sx?$": "ts-jest"
},
"testRegex": "(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$",
"moduleFileExtensions": ["ts", "tsx", "js", "jsx", "json", "node"]
"moduleFileExtensions": [
"ts",
"tsx",
"js",
"jsx",
"json",
"node"
]
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"types": "dist/index.d.ts",
"scripts": {
"test": "jest --config jestconfig.json",
"test:watch": "npm run test -- --watch",
"build": "rollup -c",
"watch": "rollup -cw",
"format": "prettier --write \"src/**/*.ts\" \"src/**/*.js\"",
Expand Down

0 comments on commit 0c77118

Please sign in to comment.