Browse Source

Add config for babel-jest

release-0.3.5
Fred Chasen 3 years ago
parent
commit
10f6158252
  1. 4
      .babelrc
  2. 7
      babel-jest.config.json
  3. 5
      jest.config.js
  4. 1309
      package-lock.json
  5. 2
      package.json
  6. 5
      specs/jest.config.js

4
.babelrc

@ -1,4 +0,0 @@
{
"presets": ["@babel/env"],
"plugins": ["@babel/plugin-proposal-async-generator-functions", "@babel/plugin-transform-runtime"]
}

7
babel-jest.config.json

@ -0,0 +1,7 @@
{
"presets": ["@babel/env"],
"plugins": [
"@babel/plugin-proposal-async-generator-functions",
"@babel/plugin-transform-runtime"
]
}

5
jest.config.js

@ -1,4 +1,7 @@
export default {
testMatch: ['**/?(*.)(test).js'],
testMatch: ["**/?(*.)(test).js"],
testEnvironment: "jsdom",
transform: {
"\\.js$": ["babel-jest", { configFile: "./babel-jest.config.json" }]
},
};

1309
package-lock.json generated

File diff suppressed because it is too large Load Diff

2
package.json

@ -27,7 +27,7 @@
"@babel/core": "^7.17.8",
"@babel/plugin-proposal-async-generator-functions": "^7.16.8",
"@babel/plugin-transform-runtime": "^7.17.0",
"@babel/preset-env": "^7.16.11",
"@babel/preset-env": "^7.18.2",
"@rollup/plugin-commonjs": "^21.0.3",
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-node-resolve": "^13.1.3",

5
specs/jest.config.js

@ -3,5 +3,8 @@ export default {
globalSetup: "./jest_helpers/setup.js",
globalTeardown: "./jest_helpers/teardown.js",
testEnvironment: "./jest_helpers/puppeteer_environment.js",
setupFilesAfterEnv: ["./jest_helpers/setup_tests.js"]
setupFilesAfterEnv: ["./jest_helpers/setup_tests.js"],
transform: {
"\\.js$": ["babel-jest", { configFile: "./babel-jest.config.json" }]
},
};

Loading…
Cancel
Save