-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature/arackis/make work with d3 v7 (#307)
* Install d3, update Jest to transpile d3 * Fix unit tests - negative numbers were using the wrong negative unicode character * Include d3@6 as acceptable * Undo whitespace changes in jest config
- Loading branch information
Showing
7 changed files
with
306 additions
and
29,906 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,26 @@ | ||
module.exports = { | ||
presets: [ | ||
[ | ||
'@babel/preset-env', | ||
{ | ||
targets: { | ||
browsers: '> 3%', | ||
}, | ||
}, | ||
], | ||
'@babel/preset-react', | ||
'@babel/preset-flow', | ||
], | ||
plugins: [ | ||
'@babel/plugin-proposal-class-properties', | ||
'@babel/plugin-proposal-object-rest-spread', | ||
], | ||
env: { | ||
production: { | ||
plugins: ['lodash'], | ||
}, | ||
test: { | ||
plugins: ['babel-plugin-rewire'], | ||
}, | ||
}, | ||
}; |
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,14 +1,14 @@ | ||
const dontTranspiledThese = ['internmap', 'delaunator', 'robust-predicates']; | ||
const dontTranspile = dontTranspiledThese.join('|'); | ||
|
||
const config = { | ||
collectCoverage: true, | ||
collectCoverageFrom: [ | ||
'src/**/*.js' | ||
], | ||
setupFiles: [ | ||
'<rootDir>/tests/jsdom/setup.js' | ||
], | ||
setupFilesAfterEnv: [ | ||
'./node_modules/jest-enzyme/lib/index.js' | ||
], | ||
collectCoverage: true, | ||
collectCoverageFrom: ['src/**/*.js'], | ||
setupFiles: ['<rootDir>/tests/jsdom/setup.js'], | ||
setupFilesAfterEnv: ['./node_modules/jest-enzyme/lib/index.js'], | ||
transformIgnorePatterns: [ | ||
`[/\\\\]node_modules[/\\\\]((?!(?<=[/\\\\])(d3-?|${dontTranspile})).)+\\.(js|jsx|ts|tsx)$`, | ||
], | ||
}; | ||
|
||
module.exports = config; | ||
module.exports = config; |
Oops, something went wrong.