Skip to content

Commit f202d60

Browse files
authored
Updated ts-loader package and others (#413)
1 parent bc1a6c8 commit f202d60

File tree

6 files changed

+2749
-1519
lines changed

6 files changed

+2749
-1519
lines changed

jest.config.ts

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ const config: Config = {
55
verbose: true,
66
};
77

8+
function modulesPattern(...args: string[]): string[] | undefined {
9+
if (args.length === 0) {
10+
return undefined;
11+
}
12+
return [`/node_modules/(?!(${args.join('|')}))`];
13+
}
14+
815
export const baseConfigFor = (project: string, testExtension: string): Config => ({
916
displayName: project,
1017
roots: ['<rootDir>'],
@@ -26,7 +33,17 @@ export const baseConfigFor = (project: string, testExtension: string): Config =>
2633
'^.+\\.(css|styl|less|sass|scss)$': 'jest-css-modules-transform',
2734
},
2835

29-
transformIgnorePatterns: ['/node_modules/(?!(@vscode/webview-ui-toolkit/|@microsoft/|exenv-es6/|@atlaskit/))'],
36+
transformIgnorePatterns: modulesPattern(
37+
'@vscode/webview-ui-toolkit/',
38+
'@microsoft/',
39+
'exenv-es6/',
40+
'@atlaskit/',
41+
'flatten-anything/',
42+
'filter-anything/',
43+
'merge-anything',
44+
'is-what/',
45+
'axios-curlirize/',
46+
),
3047

3148
collectCoverage: true,
3249
collectCoverageFrom: [

0 commit comments

Comments
 (0)