make jest work with js and ts

typescript
Yanick Champoux 2019-10-23 12:56:12 -04:00
parent 199ab2ba31
commit 11ff89501d
2 changed files with 27 additions and 12 deletions

9
jest.config.js Normal file
View File

@ -0,0 +1,9 @@
module.exports = {
"roots": [
"./src"
],
"transform": {
"^.+\\.ts$": "ts-jest",
"^.+\\.js$": "babel-jest",
},
}

View File

@ -7,8 +7,12 @@
"@babel/cli": "^7.6.4",
"@babel/core": "^7.6.4",
"@babel/preset-env": "^7.6.3",
"@types/lodash": "^4.14.144",
"babel-jest": "^24.9.0",
"jest": "^24.9.0",
"ts-jest": "^24.1.0",
"tsd": "^0.10.0",
"typescript": "^3.6.4",
"updeep": "^1.2.0"
},
"license": "MIT",
@ -20,16 +24,18 @@
"test": "jest"
},
"version": "0.1.0",
"repository": {
"type": "git",
"url": "git+https://github.com/yanick/updux.git"
},
"keywords": [
"redux", "updeep"
],
"author": "Yanick Champoux <yanick@babyl.ca> (http://techblog.babyl.ca)",
"bugs": {
"url": "https://github.com/yanick/updux/issues"
},
"homepage": "https://github.com/yanick/updux#readme"
"repository": {
"type": "git",
"url": "git+https://github.com/yanick/updux.git"
},
"keywords": [
"redux",
"updeep"
],
"author": "Yanick Champoux <yanick@babyl.ca> (http://techblog.babyl.ca)",
"bugs": {
"url": "https://github.com/yanick/updux/issues"
},
"homepage": "https://github.com/yanick/updux#readme",
"types": "./index.d.ts"
}