-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
1,935 additions
and
122 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"presets": [ | ||
["@babel/preset-env", { | ||
"targets": { | ||
"browsers": ["last 2 versions"] | ||
} | ||
}], | ||
"@babel/preset-react" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,21 @@ | ||
const config = require('../../jest.config'); | ||
const path = require('path'); | ||
|
||
module.exports = { | ||
...config, | ||
rootDir: './', | ||
coveragePathIgnorePatterns: ['<rootDir>/__tests__/__fixtures__/'], | ||
collectCoverageFrom: [ | ||
'**/*.{js,jsx}', | ||
'!lib/*.js', | ||
'!**/node_modules/**', | ||
'!jest.config.js', | ||
'!**/coverage/lcov-report/**', | ||
], | ||
setupFiles: [path.join(__dirname, '/lib/enzyme')], | ||
testPathIgnorePatterns: ['<rootDir>/__tests__/__fixtures__/'], | ||
transform: { | ||
'^.+\\.jsx?$': path.join(__dirname, '/lib/babel-jest'), | ||
}, | ||
transformIgnorePatterns: [ | ||
// Since `@readme/variable` doesn't ship any transpiled code, we need to transform it as we're running tests. | ||
'<rootDir>/node_modules/@readme/variable/^.+\\.jsx?$', | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/* eslint import/no-extraneous-dependencies: ["error", {"devDependencies": true }] */ | ||
const babelJest = require('babel-jest'); | ||
const path = require('path'); | ||
const babelRc = JSON.parse(require('fs').readFileSync(path.join(__dirname, '..', '.babelrc'), 'utf8')); | ||
|
||
module.exports = babelJest.createTransformer(babelRc); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/* eslint-disable import/no-extraneous-dependencies */ | ||
const Adapter = require('enzyme-adapter-react-16'); | ||
const enzyme = require('enzyme'); | ||
|
||
require('babel-polyfill'); | ||
|
||
enzyme.configure({ adapter: new Adapter() }); |
Oops, something went wrong.