Skip to content
This repository has been archived by the owner on Mar 14, 2024. It is now read-only.

Commit

Permalink
test: adapt e2e test setup to help WebStorm detect correct jest confi…
Browse files Browse the repository at this point in the history
…g automatically
  • Loading branch information
sleidig committed Feb 29, 2024
1 parent bdb9417 commit 8d0ae22
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 14 deletions.
21 changes: 17 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"test:watch": "jest --watch",
"test:cov": "jest --coverage",
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
"test:e2e": "jest --config ./test/jest-e2e.json"
"test:e2e": "jest --config test/jest.config.js"
},
"dependencies": {
"@nestjs/axios": "^3.0.2",
Expand Down Expand Up @@ -48,6 +48,7 @@
"@types/uuid": "9.0.8",
"@typescript-eslint/eslint-plugin": "^7.1.0",
"@typescript-eslint/parser": "^7.1.0",
"dotenv": "^16.4.5",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.1.3",
Expand Down
9 changes: 0 additions & 9 deletions test/jest-e2e.json

This file was deleted.

11 changes: 11 additions & 0 deletions test/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module.exports = {
moduleFileExtensions: ['js', 'json', 'ts'],
rootDir: '.',
testEnvironment: 'node',
testRegex: '.e2e-spec.ts$',
transform: {
'^.+\\.(t|j)s$': 'ts-jest',
},
};

require('dotenv').config({ path: '../.env' });

0 comments on commit 8d0ae22

Please sign in to comment.