Skip to content

Commit

Permalink
chore: fix workspace glob and remove unnecessary jest deps (#1199)
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesHenry committed Nov 16, 2022
1 parent 0207d19 commit d753626
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 418 deletions.
1 change: 1 addition & 0 deletions jest.preset.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ const nxPreset = require('@nrwl/jest/preset').default;

module.exports = {
...nxPreset,
testEnvironment: 'node',
};
1 change: 1 addition & 0 deletions nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"dependsOn": ["^build"]
},
"test": {
"dependsOn": ["^build"],
"inputs": ["default", "^production", "{workspaceRoot}/jest.preset.js"]
}
},
Expand Down
5 changes: 1 addition & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
"yarn": "1.22.19"
},
"workspaces": [
"packages/*",
"!packages/nx-plugin"
"packages/!(nx-plugin)*"
],
"contributors": [
"James Henry <angular-eslint@jameshenry.email>"
Expand Down Expand Up @@ -82,8 +81,6 @@
"execa": "5.1.1",
"husky": "8.0.2",
"jest": "28.1.1",
"jest-environment-jsdom": "28.1.1",
"jest-preset-angular": "12.2.2",
"json-schema-to-typescript": "11.0.2",
"json-schema-traverse": "1.0.0",
"jsonc-eslint-parser": "^2.1.0",
Expand Down
1 change: 0 additions & 1 deletion packages/builder/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ export default {
tsconfig: '<rootDir>/tsconfig.spec.json',
},
},
testEnvironment: 'node',
transform: {
'^.+\\.[tj]sx?$': 'ts-jest',
},
Expand Down
3 changes: 0 additions & 3 deletions packages/eslint-plugin-template/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,9 @@ export default {
tsconfig: '<rootDir>/tsconfig.spec.json',
},
},
testEnvironment: 'node',
transform: {
'^.+\\.tsx?$': 'ts-jest',
},
testMatch: null,
testRegex: ['./tests/.+\\.test\\.ts$', './tests/.+/spec\\.ts$'],
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
coverageDirectory: '../../coverage/packages/eslint-plugin-template',
coverageReporters: ['text-summary', 'lcov'],
Expand Down
6 changes: 1 addition & 5 deletions packages/eslint-plugin/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,9 @@ export default {
tsconfig: '<rootDir>/tsconfig.spec.json',
},
},
testEnvironment: 'node',
transform: {
'^.+\\.(ts|mjs|js|html)$': 'jest-preset-angular',
'^.+\\.tsx?$': 'ts-jest',
},
transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'],
testMatch: null,
testRegex: ['./tests/.+\\.test\\.ts$', './tests/.+/spec\\.ts$'],
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
coverageDirectory: '../../coverage/packages/eslint-plugin',
coverageReporters: ['text-summary', 'lcov'],
Expand Down
3 changes: 0 additions & 3 deletions packages/schematics/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,9 @@ export default {
tsconfig: '<rootDir>/tsconfig.spec.json',
},
},
testEnvironment: 'node',
transform: {
'^.+\\.[tj]sx?$': 'ts-jest',
},
testMatch: null,
testRegex: ['./tests/.+\\.test\\.ts$'],
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
coverageDirectory: '../../coverage/packages/schematics',
coverageReporters: ['text-summary', 'lcov'],
Expand Down
5 changes: 1 addition & 4 deletions packages/template-parser/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,8 @@ export default {
},
testEnvironment: 'node',
transform: {
'^.+\\.(ts|mjs|js|html)$': 'jest-preset-angular',
'^.+\\.tsx?$': 'ts-jest',
},
transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'],
testMatch: null,
testRegex: ['./tests/.+\\.test\\.ts$'],
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
coverageDirectory: '../../coverage/packages/template-parser',
coverageReporters: ['text-summary', 'lcov'],
Expand Down

0 comments on commit d753626

Please sign in to comment.