Skip to content

Commit 881ca4a

Browse files
committed
Added Jest config
Updated eslint config
1 parent 3733e78 commit 881ca4a

File tree

15 files changed

+15608
-6021
lines changed

15 files changed

+15608
-6021
lines changed

samples/from_crud_to_eventsourcing/.eslintrc.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
{
22
"env": {
3-
"es2020": true,
3+
"es2021": true,
44
"node": true
55
},
6-
"extends": ["eslint:recommended", "plugin:prettier/recommended"],
6+
"extends": [
7+
"eslint:recommended",
8+
"plugin:@typescript-eslint/recommended",
9+
"plugin:prettier/recommended"
10+
],
711
"parser": "@typescript-eslint/parser",
812
"parserOptions": {
9-
"ecmaVersion": 11,
13+
"ecmaVersion": 12,
1014
"sourceType": "module"
1115
},
1216
"plugins": ["@typescript-eslint"],

samples/from_crud_to_eventsourcing/.vscode/launch.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,31 @@
2121
"--inspect-brk=9229"
2222
],
2323
"port": 9229
24+
},
25+
{
26+
"name": "Jest all tests",
27+
"type": "node",
28+
"request": "launch",
29+
"program": "${workspaceRoot}/node_modules/jest/bin/jest.js",
30+
"args": ["--verbose", "-i", "--no-cache", "--watchAll"],
31+
"console": "integratedTerminal",
32+
"internalConsoleOptions": "neverOpen"
33+
},
34+
{
35+
"name": "Jest current test",
36+
"type": "node",
37+
"request": "launch",
38+
"program": "${workspaceFolder}/node_modules/jest/bin/jest",
39+
"args": [
40+
"--verbose",
41+
"-i",
42+
"--no-cache",
43+
"--runTestsByPath",
44+
"${relativeFile}",
45+
"--watchAll"
46+
],
47+
"console": "integratedTerminal",
48+
"internalConsoleOptions": "neverOpen"
2449
}
2550
]
2651
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
module.exports = {
2+
preset: 'ts-jest',
3+
testEnvironment: 'node',
4+
roots: ['<rootDir>/src'],
5+
transform: {
6+
'^.+\\.(ts|tsx)$': 'ts-jest',
7+
},
8+
setupFilesAfterEnv: ['./jest.setup.js'],
9+
moduleNameMapper: {
10+
'#core/(.*)': '<rootDir>/src/core/$1',
11+
'#config': '<rootDir>/config.ts',
12+
'#testing/(.*)': '<rootDir>/src/testing/$1',
13+
},
14+
globals: {
15+
'ts-jest': {
16+
tsconfig: './tsconfig.json',
17+
},
18+
},
19+
};
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
jest.setTimeout(180_000);

0 commit comments

Comments
 (0)