make jest work with js and ts

This commit is contained in:
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/cli": "^7.6.4",
"@babel/core": "^7.6.4", "@babel/core": "^7.6.4",
"@babel/preset-env": "^7.6.3", "@babel/preset-env": "^7.6.3",
"@types/lodash": "^4.14.144",
"babel-jest": "^24.9.0", "babel-jest": "^24.9.0",
"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" "updeep": "^1.2.0"
}, },
"license": "MIT", "license": "MIT",
@ -25,11 +29,13 @@
"url": "git+https://github.com/yanick/updux.git" "url": "git+https://github.com/yanick/updux.git"
}, },
"keywords": [ "keywords": [
"redux", "updeep" "redux",
"updeep"
], ],
"author": "Yanick Champoux <yanick@babyl.ca> (http://techblog.babyl.ca)", "author": "Yanick Champoux <yanick@babyl.ca> (http://techblog.babyl.ca)",
"bugs": { "bugs": {
"url": "https://github.com/yanick/updux/issues" "url": "https://github.com/yanick/updux/issues"
}, },
"homepage": "https://github.com/yanick/updux#readme" "homepage": "https://github.com/yanick/updux#readme",
"types": "./index.d.ts"
} }