Skip to content

Commit

Permalink
chore: update nx dependencies and configuration files (#576)
Browse files Browse the repository at this point in the history
  • Loading branch information
dianjuar authored Jan 23, 2024
1 parent dc3282d commit f8328e1
Show file tree
Hide file tree
Showing 11 changed files with 356 additions and 1,647 deletions.
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Add files here to ignore them from prettier formatting
/dist
/coverage
/.nx/cache
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
export default {
displayName: 'ngx-deploy-npm-e2e',
preset: '../../jest.preset.js',
transform: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const originalJestConfig = require('./jest.config');
import originalJestConfig from './jest.config';

module.exports = {
export default {
...originalJestConfig,
testPathIgnorePatterns: ['/node_modules/', 'tests/.*'],
};
4 changes: 2 additions & 2 deletions e2e/ngx-deploy-npm-e2e/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
"e2e": {
"executor": "@nx/jest:jest",
"options": {
"jestConfig": "e2e/ngx-deploy-npm-e2e/jest.config.js",
"jestConfig": "e2e/ngx-deploy-npm-e2e/jest.config.ts",
"runInBand": true
},
"dependsOn": ["ngx-deploy-npm:build"]
},
"integration": {
"executor": "@nx/jest:jest",
"options": {
"jestConfig": "e2e/ngx-deploy-npm-e2e/jest.integration.config.js",
"jestConfig": "e2e/ngx-deploy-npm-e2e/jest.integration.config.ts",
"runInBand": true
},
"dependsOn": ["ngx-deploy-npm:build"]
Expand Down
5 changes: 0 additions & 5 deletions jest.config.js

This file was deleted.

5 changes: 5 additions & 0 deletions jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { getJestProjects } from '@nx/jest';

export default {
projects: getJestProjects(),
};
16 changes: 2 additions & 14 deletions jest.preset.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,3 @@
const nxPreset = require('@nx/jest/preset');
const nxPreset = require('@nx/jest/preset').default;

module.exports = {
...nxPreset,
/* TODO: Update to latest Jest snapshotFormat
* By default Nx has kept the older style of Jest Snapshot formats
* to prevent breaking of any existing tests with snapshots.
* It's recommend you update to the latest format.
* You can do this by removing snapshotFormat property
* and running tests with --update-snapshot flag.
* Example: "nx affected --targets=test --update-snapshot"
* More info: https://jestjs.io/docs/upgrading-to-jest29#snapshot-format
*/
snapshotFormat: { escapeString: true, printBasicPrototype: true },
};
module.exports = { ...nxPreset };
Loading

0 comments on commit f8328e1

Please sign in to comment.