Skip to content

Commit

Permalink
Fixed build and test configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
jschoubben committed Jun 5, 2021
1 parent 6f9a03e commit 3c9cee1
Show file tree
Hide file tree
Showing 8 changed files with 4,972 additions and 3,006 deletions.
12 changes: 0 additions & 12 deletions .babelrc

This file was deleted.

31 changes: 31 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
module.exports = (api) => {
api.cache(false);
return{
"presets": [
[
"@babel/preset-env",
{
"targets": ">.25%"
}
],
"@babel/preset-flow",
"@babel/preset-react"
],
env: {
test: {
presets: [
"@babel/preset-flow",
"@babel/preset-react"
],
plugins: [
[
"@babel/plugin-transform-runtime",
{
"regenerator": true,
}
]
]
}
}
}
}
40 changes: 40 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
module.exports = {
"setupFilesAfterEnv": ["<rootDir>jest.setup.js"],
testEnvironment: "jsdom",
"testURL": "http://localhost/",
"resetMocks": true,
"resetModules": true,
"collectCoverage": true,
"collectCoverageFrom": [
"packages/**/*.js",
"!packages/**/dist/**",
"!**/node_modules/**",
"!**/*.story.js"
],
"moduleNameMapper": {
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/__mocks__/fileMock.js",
"\\.(css|less|scss|sass)$": "identity-obj-proxy"
},
"coverageThreshold": {
"global": {
"branches": 50,
"functions": 56,
"lines": 38,
"statements": 38
}
},
"coverageReporters": [
"lcov",
"html"
],
"coveragePathIgnorePatterns": [
"<rootDir>node_modules/",
"<rootDir>coverage/"
],
"testMatch": [
"**/?(*.)(spec).js?(x)"
],
"testPathIgnorePatterns": [
"<rootDir>node_modules/"
]
}
Loading

0 comments on commit 3c9cee1

Please sign in to comment.