-
I want to run test my code which I use this pacakge. This is my module.exports = {
coverageProvider: "v8",
collectCoverageFrom: [
"**/*.{js,jsx,ts,tsx}",
"!**/*.d.ts",
"!**/node_modules/**",
"!<rootDir>/out/**",
"!<rootDir>/.next/**",
"!<rootDir>/*.config.js",
"!<rootDir>/coverage/**",
],
moduleDirectories: ["node_modules", "<rootDir>/"],
testEnvironment: "jest-environment-jsdom",
setupFiles: ["./jest.setup.js"],
setupFilesAfterEnv: ["<rootDir>/src/tests/jest.custom-matchers.ts"],
testMatch: ["**/?(*.)+(test).[jt]s?(x)"],
testPathIgnorePatterns: ["<rootDir>/node_modules/", "<rootDir>/.next/"],
transform: {
"^.+\\.(ts|tsx)$": [
"babel-jest",
{
configFile: "./.babelrc.js",
},
],
},
transformIgnorePatterns: ["/node_modules/(?!yaml)/"],
}; and this is my module.exports = {
presets: [
[
"next/babel",
{
"preset-react": {
runtime: "automatic",
importSource: "@emotion/react",
},
},
],
],
plugins: [
"@emotion",
"macros",
[
"@emotion/babel-plugin-jsx-pragmatic",
{
export: "jsx",
import: "__cssprop",
module: "@emotion/react",
},
],
["@babel/plugin-transform-react-jsx", { pragma: "__cssprop" }, "twin.macro"],
],
env: {
test: {
presets: [["@babel/preset-env", { targets: { esmodules: false, node: "current" } }]],
},
},
}; |
Beta Was this translation helpful? Give feedback.
Answered by
eemeli
Aug 1, 2022
Replies: 2 comments
-
This isn't really a |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
re-taro
-
@re-taro Do you mind sharing your solution? I have the same problem when upgrading YAML version from 2.3.3 to 2.4.1 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This isn't really a
yaml
question, but ajest
question. And you probably want to apply your transform also to.js
files.