diff --git a/__mocks__/@astral-sh/ruff-wasm-web.js b/__mocks__/@astral-sh/ruff-wasm-web.js new file mode 100644 index 0000000000..8124c79ba3 --- /dev/null +++ b/__mocks__/@astral-sh/ruff-wasm-web.js @@ -0,0 +1,3 @@ +const init = jest.fn(); +export const Workspace = jest.fn(); +export default init; diff --git a/jest.config.base.cjs b/jest.config.base.cjs index 1dd7d695f4..07d90e1731 100644 --- a/jest.config.base.cjs +++ b/jest.config.base.cjs @@ -65,6 +65,10 @@ module.exports = { ), // Handle monaco worker files '\\.worker.*$': 'identity-obj-proxy', + '^@astral-sh/ruff-wasm-web$': path.join( + __dirname, + './__mocks__/@astral-sh/ruff-wasm-web.js' + ), // Handle pouchdb modules '^pouchdb-browser$': path.join( __dirname,