Skip to content

Commit 0a2ade3

Browse files
committed
Update transformIgnorePatterns
1 parent a94e5fe commit 0a2ade3

File tree

4 files changed

+10
-12
lines changed

4 files changed

+10
-12
lines changed

extensions/ql-vscode/src/view/jest.config.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import type { Config } from "jest";
2+
import { transformIgnorePatterns } from "../../test/jest-config";
23

34
/*
45
* For a detailed explanation regarding each configuration property and type check, visit:
@@ -184,10 +185,7 @@ const config: Config = {
184185
},
185186

186187
// An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation
187-
transformIgnorePatterns: [
188-
// These use ES modules, so need to be transformed
189-
"node_modules/(?!(?:@vscode/webview-ui-toolkit|@microsoft/.+|exenv-es6|d3|d3-(.*)|internmap|delaunator|robust-predicates)/.*)",
190-
],
188+
transformIgnorePatterns,
191189

192190
// An array of regexp pattern strings that are matched against all modules before the module loader will automatically return a mock for them
193191
// unmockedModulePathPatterns: undefined,
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export const transformIgnorePatterns = [
2+
// These use ES modules, so need to be transformed
3+
"node_modules/(?!(?:@vscode/webview-ui-toolkit|@microsoft/.+|@octokit/.+|before-after-hook|d3|d3-(.*)|delaunator|exenv-es6|internmap|nanoid|p-queue|p-timeout|robust-predicates|universal-user-agent)/.*)",
4+
];

extensions/ql-vscode/test/unit-tests/jest.config.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import type { Config } from "jest";
2+
import { transformIgnorePatterns } from "../jest-config";
23

34
/*
45
* For a detailed explanation regarding each configuration property and type check, visit:
@@ -180,10 +181,7 @@ const config: Config = {
180181
},
181182

182183
// An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation
183-
transformIgnorePatterns: [
184-
// These use ES modules, so need to be transformed
185-
"node_modules/(?!(?:@vscode/webview-ui-toolkit|@microsoft/.+|exenv-es6|nanoid|p-queue|p-timeout)/.*)",
186-
],
184+
transformIgnorePatterns,
187185

188186
// An array of regexp pattern strings that are matched against all modules before the module loader will automatically return a mock for them
189187
// unmockedModulePathPatterns: undefined,

extensions/ql-vscode/test/vscode-tests/jest.config.base.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import type { Config } from "jest";
22
import { resolve } from "path";
3+
import { transformIgnorePatterns } from "../jest-config";
34

45
/*
56
* For a detailed explanation regarding each configuration property and type check, visit:
@@ -181,10 +182,7 @@ const config: Config = {
181182
},
182183

183184
// An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation
184-
transformIgnorePatterns: [
185-
// These use ES modules, so need to be transformed
186-
"node_modules/(?!(?:@vscode/webview-ui-toolkit|@microsoft/.+|exenv-es6|nanoid|p-queue|p-timeout)/.*)",
187-
],
185+
transformIgnorePatterns,
188186

189187
// An array of regexp pattern strings that are matched against all modules before the module loader will automatically return a mock for them
190188
// unmockedModulePathPatterns: undefined,

0 commit comments

Comments
 (0)