commit ee27f2e15213c9cde171d0dbb693ba651e945625
parent 2c0e1a08404b635904d32b00f445eb0571bbdd20
Author: Sebastian <sebasjm@gmail.com>
Date: Thu, 27 May 2021 16:30:01 -0300
fix jest
jest needs normal js files and need them to be transformed before running
https://jestjs.io/docs/configuration#transform-objectstring-pathtotransformer--pathtotransformer-object
https://jestjs.io/docs/tutorial-react-native#transformignorepatterns-customization
The transformIgnorePatterns option can be used to specify which files shall be transformed by Babel. Many react-native npm modules unfortunately don't pre-compile their source code before publishing.
By default the jest-react-native preset only processes the project's own source files and react-native. If you have npm dependencies that have to be transformed you can customize this configuration option by including modules other than ...
Diffstat:
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/packages/frontend/package.json b/packages/frontend/package.json
@@ -107,6 +107,10 @@
},
"jest": {
"preset": "jest-preset-preact",
+ "transformIgnorePatterns": [
+ "node_modules/.pnpm/(?!(@gnu-taler\\+taler-util))",
+ "\\.pnp\\.[^\\\/]+$"
+ ],
"setupFiles": [
"<rootDir>/tests/__mocks__/browserMocks.ts",
"<rootDir>/tests/__mocks__/setupTests.ts"
@@ -118,4 +122,4 @@
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga|po)$": "<rootDir>/tests/__mocks__/fileTransformer.js"
}
}
-}
+}
+\ No newline at end of file