Skip to content

Commit 5a879c9

Browse files
committed
Migrate from Mocha to Jest
1 parent bf39b3d commit 5a879c9

16 files changed

Lines changed: 7378 additions & 4245 deletions

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ types/
44
/test/restDocs/*.json
55
/test/restDocs/results/
66
/test/restDocs/snapshots/
7+
jest*.config.js

jest.config.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
export default {
2+
extensionsToTreatAsEsm: ['.ts'],
3+
moduleNameMapper: {
4+
'^(\\.{1,2}/.*)\\.js$': '$1',
5+
},
6+
transform: {
7+
'^.+\\.ts$': ['ts-jest', {useESM: true}],
8+
},
9+
testRegex: '(/test/.*|(\\.|/))\\.spec\\.ts$',
10+
};

jest.integration.config.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
export default {
2+
extensionsToTreatAsEsm: ['.ts'],
3+
moduleNameMapper: {
4+
'^(\\.{1,2}/.*)\\.js$': '$1',
5+
},
6+
transform: {
7+
'^.+\\.ts$': ['ts-jest', {useESM: true}],
8+
},
9+
testRegex: '(/test/.*|(\\.|/))\\.integration\\.spec\\.ts$',
10+
};

0 commit comments

Comments
 (0)