File tree 3 files changed +11
-3
lines changed
3 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ import { pathsToModuleNameMapper } from 'ts-jest';
3
3
// eslint-disable-next-line @typescript-eslint/no-var-requires
4
4
const { compilerOptions } = require ( './tsconfig.json' ) ;
5
5
6
+ const EXCLUDE_PATHS = new Set ( [ 'class-transformer/cjs/storage' ] ) ;
7
+
6
8
module . exports = {
7
9
clearMocks : true ,
8
10
testMatch : [
@@ -18,7 +20,13 @@ module.exports = {
18
20
] ,
19
21
} ,
20
22
modulePaths : [ compilerOptions . baseUrl ] ,
21
- moduleNameMapper : pathsToModuleNameMapper ( compilerOptions . paths ) ,
23
+ moduleNameMapper : pathsToModuleNameMapper (
24
+ Object . fromEntries (
25
+ Object . entries ( compilerOptions . paths ) . filter (
26
+ ( e ) : e is [ string , string [ ] ] => ! EXCLUDE_PATHS . has ( e [ 0 ] ) ,
27
+ ) ,
28
+ ) ,
29
+ ) ,
22
30
setupFiles : [ './test/setup.ts' ] ,
23
31
setupFilesAfterEnv : [ 'jest-extended/all' ] ,
24
32
} ;
Original file line number Diff line number Diff line change 1
1
import * as transformer from 'class-transformer' ;
2
- import { defaultMetadataStorage } from 'class-transformer/types /storage' ;
2
+ import { defaultMetadataStorage } from 'class-transformer/cjs /storage' ;
3
3
import * as validator from 'class-validator' ;
4
4
5
5
import { applyDecorators , IsRecord , MutuallyExclusive } from '../../utils' ;
Original file line number Diff line number Diff line change 26
26
"paths" : {
27
27
"webpack-userscript" : [" lib" ],
28
28
"webpack-userscript/*" : [" lib/*" ],
29
- "class-transformer/types /storage" : [" node_modules/class-transformer/cjs /storage" ]
29
+ "class-transformer/cjs /storage" : [" node_modules/class-transformer/types /storage" ]
30
30
}
31
31
},
32
32
"include" : [" **/*.ts" ]
You can’t perform that action at this time.
0 commit comments