Skip to content

Commit

Permalink
refactor jest config
Browse files Browse the repository at this point in the history
  • Loading branch information
touv committed Aug 8, 2024
1 parent 4e86dc8 commit 6b54e0e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
10 changes: 10 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,16 @@ module.exports = {
testPathIgnorePatterns: ['e2e'],
testMatch: ['/**/*.spec.js'],
},
{
displayName: 'api-e2e',
rootDir: `${__dirname}/src/api/e2e`,
testEnvironment: 'node',
testMatch: ['/**/*.spec.js'],
moduleDirectories: ['node_modules'],
transformIgnorePatterns: [
'<rootDir>/node_modules/',
],
},
{
displayName: 'common',
rootDir: `${__dirname}/src/common`,
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
"clean:modules": "modclean -Pr -n ./modclean.config.js:*",
"clean:workers": "modclean -Pr -n ./modclean.config.js:* -D workers",
"clean:packages": "modclean -Pr -n ./modclean.config.js:* -D packages",
"test:api:e2e": "./node_modules/jest/bin/jest.js --colors --runInBand --detectOpenHandles -c src/api/e2e/jest.config.js src/api/e2e",
"test:api:e2e:watch": "./node_modules/jest/bin/jest.js --colors --runInBand --detectOpenHandles -c src/api/e2e/jest.config.js src/api/e2e --watch",
"test:unit": "./node_modules/jest/bin/jest.js --force-exit --detectOpenHandles --colors",
"test:unit:watch": "./node_modules/jest/bin/jest.js --watch --colors",
"test:api:e2e": "jest --colors --runInBand --detectOpenHandles --projects api-e2e",
"test:api:e2e:watch": "jest --colors --runInBand --detectOpenHandles --projects api-e2e --watch",
"test:unit": "jest --force-exit --detectOpenHandles --colors --ignoreProjects api-e2e",
"test:unit:watch": "jest --watch --colors --ignoreProjects api-e2e",
"test:e2e:phase:one": "cypress run --browser chrome --spec \"cypress/e2e/phase_1/*.cy.js\"",
"test:e2e:phase:two": "cypress run --browser chrome --spec \"cypress/e2e/phase_2/*.cy.js\"",
"test:e2e:phase:three": "cypress run --browser chrome --spec \"cypress/e2e/phase_3/*.cy.js\"",
Expand Down
3 changes: 0 additions & 3 deletions src/api/e2e/jest.config.js

This file was deleted.

0 comments on commit 6b54e0e

Please sign in to comment.