File tree Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Expand file tree Collapse file tree 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';
33// eslint-disable-next-line @typescript-eslint/no-var-requires
44const { compilerOptions } = require ( './tsconfig.json' ) ;
55
6+ const EXCLUDE_PATHS = new Set ( [ 'class-transformer/cjs/storage' ] ) ;
7+
68module . exports = {
79 clearMocks : true ,
810 testMatch : [
@@ -18,7 +20,13 @@ module.exports = {
1820 ] ,
1921 } ,
2022 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+ ) ,
2230 setupFiles : [ './test/setup.ts' ] ,
2331 setupFilesAfterEnv : [ 'jest-extended/all' ] ,
2432} ;
Original file line number Diff line number Diff line change 11import * as transformer from 'class-transformer' ;
2- import { defaultMetadataStorage } from 'class-transformer/types /storage' ;
2+ import { defaultMetadataStorage } from 'class-transformer/cjs /storage' ;
33import * as validator from 'class-validator' ;
44
55import { applyDecorators , IsRecord , MutuallyExclusive } from '../../utils' ;
Original file line number Diff line number Diff line change 2626 "paths" : {
2727 "webpack-userscript" : [" lib" ],
2828 "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" ]
3030 }
3131 },
3232 "include" : [" **/*.ts" ]
You can’t perform that action at this time.
0 commit comments