From d5b7f9d6e9f2288429a2a81d83bfd73920192f49 Mon Sep 17 00:00:00 2001 From: Matthew Runyon Date: Wed, 6 Nov 2024 09:31:15 -0600 Subject: [PATCH] Fix tests --- __mocks__/@astral-sh/ruff-wasm-web.js | 3 +++ jest.config.base.cjs | 4 ++++ 2 files changed, 7 insertions(+) create mode 100644 __mocks__/@astral-sh/ruff-wasm-web.js 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,