Add jest-raw-loader
This commit is contained in:
parent
6f922769a3
commit
371d1026fa
4 changed files with 9 additions and 4 deletions
|
@ -164,6 +164,7 @@
|
||||||
"jest-canvas-mock": "^2.3.0",
|
"jest-canvas-mock": "^2.3.0",
|
||||||
"jest-environment-jsdom-sixteen": "^1.0.3",
|
"jest-environment-jsdom-sixteen": "^1.0.3",
|
||||||
"jest-fetch-mock": "^3.0.3",
|
"jest-fetch-mock": "^3.0.3",
|
||||||
|
"jest-raw-loader": "^1.0.1",
|
||||||
"matrix-mock-request": "^1.2.3",
|
"matrix-mock-request": "^1.2.3",
|
||||||
"matrix-react-test-utils": "^0.2.3",
|
"matrix-react-test-utils": "^0.2.3",
|
||||||
"matrix-web-i18n": "github:matrix-org/matrix-web-i18n",
|
"matrix-web-i18n": "github:matrix-org/matrix-web-i18n",
|
||||||
|
@ -193,7 +194,8 @@
|
||||||
"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"
|
"workers/(.+)\\.worker\\.ts": "<rootDir>/__mocks__/workerMock.js",
|
||||||
|
"^!!raw-loader!.*": "jest-raw-loader"
|
||||||
},
|
},
|
||||||
"transformIgnorePatterns": [
|
"transformIgnorePatterns": [
|
||||||
"/node_modules/(?!matrix-js-sdk).+$"
|
"/node_modules/(?!matrix-js-sdk).+$"
|
||||||
|
|
2
src/@types/raw-loader.d.ts
vendored
2
src/@types/raw-loader.d.ts
vendored
|
@ -16,5 +16,5 @@ limitations under the License.
|
||||||
|
|
||||||
declare module '!!raw-loader!*' {
|
declare module '!!raw-loader!*' {
|
||||||
const contents: string;
|
const contents: string;
|
||||||
export = contents;
|
export default contents;
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,8 +69,6 @@ export default abstract class Exporter {
|
||||||
protected async downloadZIP(): Promise<any> {
|
protected async downloadZIP(): Promise<any> {
|
||||||
const filename = `matrix-export-${formatFullDateNoDay(new Date())}.zip`;
|
const filename = `matrix-export-${formatFullDateNoDay(new Date())}.zip`;
|
||||||
|
|
||||||
console.log(this.files, this.files.length);
|
|
||||||
|
|
||||||
const zip = new JSZip();
|
const zip = new JSZip();
|
||||||
// Create a writable stream to the directory
|
// Create a writable stream to the directory
|
||||||
if (!this.cancelled) this.updateProgress("Generating a ZIP");
|
if (!this.cancelled) this.updateProgress("Generating a ZIP");
|
||||||
|
|
|
@ -4956,6 +4956,11 @@ jest-pnp-resolver@^1.2.2:
|
||||||
resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz#b704ac0ae028a89108a4d040b3f919dfddc8e33c"
|
resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz#b704ac0ae028a89108a4d040b3f919dfddc8e33c"
|
||||||
integrity sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w==
|
integrity sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w==
|
||||||
|
|
||||||
|
jest-raw-loader@^1.0.1:
|
||||||
|
version "1.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/jest-raw-loader/-/jest-raw-loader-1.0.1.tgz#ce9f56d54650f157c4a7d16d224ba5d613bcd626"
|
||||||
|
integrity sha1-zp9W1UZQ8VfEp9FtIkul1hO81iY=
|
||||||
|
|
||||||
jest-regex-util@^26.0.0:
|
jest-regex-util@^26.0.0:
|
||||||
version "26.0.0"
|
version "26.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-26.0.0.tgz#d25e7184b36e39fd466c3bc41be0971e821fee28"
|
resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-26.0.0.tgz#d25e7184b36e39fd466c3bc41be0971e821fee28"
|
||||||
|
|
Loading…
Reference in a new issue