feat: move jest config to external file
This commit is contained in:
Родитель
7325bc49a2
Коммит
80f53777e0
|
@ -73,6 +73,7 @@ The full folder structure of this app is explained below:
|
|||
| .env.example | API keys, tokens, passwords, database URI. Clone this, but don't check it in to public repos. |
|
||||
| .travis.yml | Used to configure Travis CI build |
|
||||
| .copyStaticAssets.js | Build script that copies images, fonts, and JS libs to the dist folder |
|
||||
| jest.config.js | Used to configure Jest |
|
||||
| package.json | File that contains npm dependencies as well as [build scripts](#what-if-a-library-isnt-on-definitelytyped) |
|
||||
| tsconfig.json | Config settings for compiling server code written in TypeScript |
|
||||
| tsconfig.tests.json | Config settings for compiling tests written in TypeScript |
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
module.exports = {
|
||||
globals: {
|
||||
'ts-jest': {
|
||||
tsConfigFile: 'tsconfig.json'
|
||||
}
|
||||
},
|
||||
moduleFileExtensions: [
|
||||
'ts',
|
||||
'js'
|
||||
],
|
||||
transform: {
|
||||
'^.+\\.(ts|tsx)$': './node_modules/ts-jest/preprocessor.js'
|
||||
},
|
||||
testMatch: [
|
||||
'**/test/**/*.test.(ts|js)'
|
||||
],
|
||||
testEnvironment: 'node'
|
||||
};
|
18
package.json
18
package.json
|
@ -24,24 +24,6 @@
|
|||
"serve-debug": "nodemon --inspect dist/server.js",
|
||||
"watch-debug": "concurrently -k -p \"[{name}]\" -n \"Sass,TypeScript,Node\" -c \"yellow.bold,cyan.bold,green.bold\" \"npm run watch-sass\" \"npm run watch-ts\" \"npm run serve-debug\""
|
||||
},
|
||||
"jest": {
|
||||
"globals": {
|
||||
"ts-jest": {
|
||||
"tsConfigFile": "tsconfig.json"
|
||||
}
|
||||
},
|
||||
"moduleFileExtensions": [
|
||||
"ts",
|
||||
"js"
|
||||
],
|
||||
"transform": {
|
||||
"^.+\\.(ts|tsx)$": "./node_modules/ts-jest/preprocessor.js"
|
||||
},
|
||||
"testMatch": [
|
||||
"**/test/**/*.test.(ts|js)"
|
||||
],
|
||||
"testEnvironment": "node"
|
||||
},
|
||||
"dependencies": {
|
||||
"async": "^2.5.0",
|
||||
"bcrypt-nodejs": "^0.0.3",
|
||||
|
|
Загрузка…
Ссылка в новой задаче