Skip to content

Commit 5cecd7c

Browse files
committed
build: move jest configs
1 parent a77ab98 commit 5cecd7c

File tree

5 files changed

+11
-12
lines changed

5 files changed

+11
-12
lines changed

jest.app.config.js

Lines changed: 0 additions & 9 deletions
This file was deleted.

jest.base.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
module.exports = {
22
preset: 'jest-preset-angular',
3+
rootDir: '../',
34
setupTestFrameworkScriptFile: '<rootDir>/test.ts',
45
globals: {
56
'ts-jest': {

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
"build": "ng build --prod ngx-testing-library",
88
"postbuild": "cp ./README.md ./dist/ngx-testing-library",
99
"test": "npm run test:lib && npm run build && npm run test:app",
10-
"test:lib": "jest --config ./jest.lib.config.js",
11-
"test:app": "jest --config ./jest.app.config.js",
10+
"test:lib": "jest --config ./projects/jest.lib.config.js",
11+
"test:app": "jest --config ./src/jest.app.config.js",
1212
"precommit": "lint-staged",
1313
"lint": "ng lint",
1414
"e2e": "ng e2e"

jest.lib.config.js renamed to projects/jest.lib.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const baseConfig = require('./jest.base.config');
1+
const baseConfig = require('../jest.base.config');
22

33
module.exports = {
44
...baseConfig,

src/jest.app.config.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
const baseConfig = require('../jest.base.config');
2+
3+
module.exports = {
4+
...baseConfig,
5+
roots: ['<rootDir>/src'],
6+
modulePaths: ['<rootDir>/dist'],
7+
};

0 commit comments

Comments
 (0)