Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions extensions/ql-vscode/__mocks__/react-dom/test-utils.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// Mock for react-dom/test-utils for React 19 compatibility
// In React 19, react-dom/test-utils is deprecated and act was moved to the react package.
const { act } = require("react");

module.exports = {
act,
};
1 change: 1 addition & 0 deletions extensions/ql-vscode/eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export default tseslint.config(
".markdownlint-cli2.cjs",
"eslint.config.mjs",
"!.storybook",
"__mocks__/",
]),
github.getFlatConfigs().recommended,
...github.getFlatConfigs().typescript,
Expand Down
2 changes: 1 addition & 1 deletion extensions/ql-vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2036,7 +2036,7 @@
"watch": "gulp watch",
"test": "npm-run-all test:*",
"test:unit": "cross-env TZ=UTC LANG=en-US NODE_OPTIONS=--no-experimental-strip-types jest --projects test/unit-tests",
"test:view": "cross-env NODE_OPTIONS=--no-experimental-strip-types jest --projects src/view",
"test:view": "cross-env NODE_ENV=test NODE_OPTIONS=--no-experimental-strip-types jest --projects src/view",
"test:vscode-integration": "npm-run-all test:vscode-integration:*",
"test:vscode-integration:activated-extension": "cross-env NODE_OPTIONS=--no-experimental-strip-types jest --projects test/vscode-tests/activated-extension",
"test:vscode-integration:no-workspace": "cross-env NODE_OPTIONS=--no-experimental-strip-types jest --projects test/vscode-tests/no-workspace",
Expand Down
2 changes: 2 additions & 0 deletions extensions/ql-vscode/src/view/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ const config: Config = {
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$":
"<rootDir>/../../test/__mocks__/fileMock.ts",
"\\.(css|less)$": "<rootDir>/../../test/__mocks__/styleMock.ts",
"^react-dom/test-utils$":
"<rootDir>/../../__mocks__/react-dom/test-utils.js",
},

// An array of regexp pattern strings, matched against all module paths before considered 'visible' to the module loader
Expand Down
Loading