File tree 5 files changed +20
-5
lines changed
Filter options
5 files changed +20
-5
lines changed
Original file line number Diff line number Diff line change @@ -2,4 +2,5 @@ node_modules
2
2
build
3
3
4
4
jest.config.js
5
+ jest.dev.config.js
5
6
jest.build.config.js
Original file line number Diff line number Diff line change @@ -14,8 +14,8 @@ install:
14
14
- yarn db migration:run
15
15
- yarn db:seeding seed
16
16
script :
17
- - yarn test --roots build/tests
18
17
- yarn test
18
+ - yarn prod:test
19
19
- yarn eslint
20
20
- yarn ejslint
21
21
notifications :
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ mutation {
39
39
Before to send a PR please do it:
40
40
- Run ` yarn test ` to run the test in dev environment.
41
41
- Run ` yarn build ` to ensure build is working.
42
- - Run ` yarn test --roots build/tests ` to run the test in with the js files.
42
+ - Run ` yarn prod: test ` to run the test in with the js files.
43
43
- Run ` yarn eslint --fix ` to validate the code style.
44
44
- Run ` yarn ejslint --fix ` to validate the ejs files.
45
45
Original file line number Diff line number Diff line change
1
+ // For a detailed explanation regarding each configuration property, visit:
2
+ // https://jestjs.io/docs/en/configuration.html
3
+
4
+ const { pathsToModuleNameMapper } = require ( 'ts-jest/utils' ) ;
5
+ const { compilerOptions } = require ( './tsconfig' ) ;
6
+ const jestConfig = require ( './jest.config' ) ;
7
+
8
+ module . exports = {
9
+ ...jestConfig ,
10
+ moduleNameMapper : pathsToModuleNameMapper (
11
+ compilerOptions . paths ,
12
+ { prefix : '<rootDir>/src' } ,
13
+ ) ,
14
+ } ;
Original file line number Diff line number Diff line change 5
5
"main" : " index.js" ,
6
6
"scripts" : {
7
7
"build" : " rm -rf build/ && tsc && tscpaths -p tsconfig.json -s ./src -o ./build && cp -R src/resources build/resources" ,
8
- "start " : " ts-node src/index.ts" ,
9
- "dev " : " nodemon --exec ts-node src/index.ts " ,
8
+ "dev " : " nodemon --exec ts-node -r tsconfig-paths/register src/index.ts" ,
9
+ "test " : " jest --config ./jest.dev.config.js --roots src/tests " ,
10
10
"eslint" : " eslint --ext=jsx,ts,tsx 'src/**/*.{ts,tsx}'" ,
11
- "test" : " jest --config ./jest.config.js" ,
12
11
"ejslint" : " ejslint src/resources/view/*" ,
13
12
"typeorm" : " ts-node ./node_modules/typeorm/cli.js --config src/init/db/connectionOptions.ts" ,
14
13
"seeding" : " ts-node ./node_modules/typeorm-seeding/dist/cli.js --configName src/init/db/connectionOptions.ts" ,
14
+ "prod:test" : " jest --config ./jest.config.js --roots build/tests" ,
15
15
"db" : " node ./node_modules/typeorm/cli.js --config build/init/db/connectionOptions.js" ,
16
16
"db:seeding" : " node ./node_modules/typeorm-seeding/dist/cli.js --configName build/init/db/connectionOptions.js"
17
17
},
You can’t perform that action at this time.
0 commit comments