This repository has been archived by the owner on May 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Update Bar unit tests to use Jest #324
Merged
Merged
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
c459c11
renamed files
sdadn 9fb584e
updated config
sdadn 8ea267a
installed puppeteer
sdadn c5c66b1
installed jest-puppeteer
sdadn ee6016e
working bar test with jest
sdadn 72ec0a3
updated Bar.test.js
sdadn 3daf048
updated Barload.test.js
sdadn 3b7ef4a
updated BarPanning.test.js
sdadn a251d2d
updated BarPanningMultipleDatasets.test.js
sdadn bfdbc74
updated BarRegions.test.js
sdadn f669889
updated BarStyles.test.js
sdadn 4a32be8
updated BarUnload.test.js & GroupedBar.test.js
sdadn 248a5da
updated StackedBar.test.js
sdadn f37cc85
code cleanup
sdadn e2e6054
updated jest config
sdadn 35c6363
working Bar tests
sdadn fcb7b49
updated dependencies
sdadn 32e8b1f
updated config
sdadn f41ac97
linter fixes
sdadn 0ad7a59
Update package.json
sdadn 6cf7494
Update packages/carbon-graphs/tests/unit/controls/Bar/BarPanning.test.js
sdadn 64987b0
Update packages/carbon-graphs/jest.config.js
sdadn 1861e2a
Update jest.config.js
sdadn 98f401d
Update AxisInfoRow.test.js
sdadn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
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
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,20 @@ | ||
module.exports = (api) => { | ||
api.cache(false); | ||
api.assertVersion('^7.4.4'); | ||
|
||
const presets = [ | ||
'@babel/preset-env', | ||
'@babel/preset-react', | ||
]; | ||
|
||
const plugins = [ | ||
'@babel/plugin-proposal-object-rest-spread', | ||
'@babel/plugin-transform-object-assign', | ||
'@babel/plugin-transform-runtime', | ||
]; | ||
|
||
return { | ||
presets, | ||
plugins, | ||
}; | ||
}; |
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,12 @@ | ||
const jestConfig = require('@cerner/jest-config-terra'); | ||
|
||
module.exports = { | ||
...jestConfig, | ||
testMatch: [ | ||
'**/tests/unit/controls/Bar/(*.)(test.js)', | ||
// The patterns below are temporarily commented out as not all tests are updated to work with Jest. | ||
// Updating them is currently a work in progress. | ||
// '**/tests/unit/**/(*.)(test.js)', | ||
// '**/tests/unit/**/**/(*.)(test.js)', | ||
], | ||
}; |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe not in this PR but I believe this is the deprecated version of this plugin. If you're continuing work on this it might be a good idea to use @babel/plugin-transform-object-rest-spread like we're doing here with the other babel plugins.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for pointing that out! I'll make that change in the next PR.