Skip to content

Commit

Permalink
Support TypeScript tests
Browse files Browse the repository at this point in the history
Install ts-jest to support Jest tests that use and import TypeScript.

Pin to ts-jest 23.10.0 to avoid kulshekhar/ts-jest#748.
  • Loading branch information
wimpyprogrammer committed Sep 23, 2018
1 parent 1b7d824 commit 74b1792
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 1 deletion.
6 changes: 5 additions & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
module.exports = {
transform: {},
moduleFileExtensions: ['js', 'json', 'ts'],
testMatch: ['**/src/**/?*.spec.(js|ts)'],
transform: {
'^.+\\.ts$': 'ts-jest',
},
};
63 changes: 63 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,13 @@
"@babel/core": "^7.1.0",
"@babel/preset-env": "^7.1.0",
"@babel/preset-typescript": "^7.1.0",
"@types/jest": "^23.3.2",
"husky": "0.14.3",
"jest": "^23.6.0",
"prettier": "1.14.3",
"pretty-quick": "1.7.0",
"rimraf": "^2.6.2",
"ts-jest": "23.10.0",
"tslint": "^5.11.0",
"typescript": "^3.0.3"
}
Expand Down

0 comments on commit 74b1792

Please sign in to comment.