stub out workers for jest tests as it doesn't like the worker-loader

pull/21833/head
Michael Telatynski 2021-07-14 18:50:01 +01:00
parent 50a9394c59
commit 296d5d1d5e
2 changed files with 3 additions and 1 deletions

1
__mocks__/workerMock.js Normal file
View File

@ -0,0 +1 @@
module.exports = jest.fn();

View File

@ -187,7 +187,8 @@
"\\$webapp/i18n/languages.json": "<rootDir>/__mocks__/languages.json", "\\$webapp/i18n/languages.json": "<rootDir>/__mocks__/languages.json",
"decoderWorker\\.min\\.js": "<rootDir>/__mocks__/empty.js", "decoderWorker\\.min\\.js": "<rootDir>/__mocks__/empty.js",
"decoderWorker\\.min\\.wasm": "<rootDir>/__mocks__/empty.js", "decoderWorker\\.min\\.wasm": "<rootDir>/__mocks__/empty.js",
"waveWorker\\.min\\.js": "<rootDir>/__mocks__/empty.js" "waveWorker\\.min\\.js": "<rootDir>/__mocks__/empty.js",
"workers/(.+)\\.worker\\.ts": "<rootDir>/__mocks__/workerMock.js"
}, },
"transformIgnorePatterns": [ "transformIgnorePatterns": [
"/node_modules/(?!matrix-js-sdk).+$" "/node_modules/(?!matrix-js-sdk).+$"