-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use jest for unittesting - standardize unit testing epic #904
Merged
+732
−1,867
Merged
Changes from 51 commits
Commits
Show all changes
60 commits
Select commit
Hold shift + click to select a range
9986d94
chore(tests): migrate to Jest
aaronmcadam cde14c7
fix(addon-knobs): remove mocha type defs
aaronmcadam 146f5a8
refactor(react-storybook): use Jest matchers instead of chai
aaronmcadam 30c9ba8
refactor(storybook-ui): use Jest matchers in index tests
aaronmcadam e53965c
refactor(storybook-ui): use Jest matchers in API tests
aaronmcadam a2a1817
remove storyshots "test"
aaronmcadam 27a8c68
fix(package.json): move Jest config to .jestrc
aaronmcadam cc9f29b
fix: remove all Yarn lock files
aaronmcadam 7a1c030
let NPM resolve the path to the snapshot serializer
aaronmcadam fb65019
fix(storybook-ui): use Jest mocks in ui test
aaronmcadam 3178d70
fix(storybook-ui): use Jest matchers, leave Sinon mocks
aaronmcadam bea3ce0
fix(storybook-ui): use Jest mocks in gen_podda_loader
aaronmcadam ac57c94
fix(storybook-ui): use Jest matchers in filters
aaronmcadam 5ff3b08
fix(storybook-ui): use Jest matchers in shortcuts
aaronmcadam f5c2978
fix(storybook-ui): use Jest mocks in handle_keyevents
aaronmcadam 41badd3
fix(storybook-ui): use Jest mocks in init_panels
aaronmcadam 6ec6bc5
fix(storybook-ui): use Jest matchers in down_panel
aaronmcadam 56aeb49
fix(storybook-ui): use Jest matchers in shortcuts_help
aaronmcadam 94c9035
update handle_keyevents
aaronmcadam c0d4c54
fix(storybook-ui): use Jest matchers in left_panel
aaronmcadam ab26aed
fix(storybook-ui): use Jest matchers and mocks in handle_routing
aaronmcadam 226cba2
fix(storybook-ui): use Jest mocks and enzyme matchers
aaronmcadam 9f6d1e7
fix(storybook-ui): use Jest matchers in layout
aaronmcadam 751de4c
fix(storybook-ui): use Jest mocks and enzyme matchers in left_panel
aaronmcadam 86680cb
fix(storybook-ui): use Jest mocks in left_panel header
aaronmcadam 7fdaf84
fix(storybook-ui): use jest matchers in layout index
aaronmcadam 52a1052
fix(storybook-ui): use Jest matchers in stories
aaronmcadam 26b96ab
fix(storybook-ui): use Jest and enzyme matchers in text_filter
aaronmcadam e2ff8c3
Merge branch 'master' into am-jest-migration
ndelangen 95d696e
CHANGE packages/channel to jest
ndelangen a738b0c
FIX unit-test for addon-comments & CHANGE to jest
ndelangen 8a5d499
REMOVE unneeded eslint-exceptions
ndelangen da4ed3b
REMOVE bullshit test
ndelangen 90f464d
CHANGE addon-knobs to jest
ndelangen 81286fc
CLEANUP testscripts
ndelangen 631c38f
MOVE test
ndelangen 730feb7
Merge branch 'master' into am-jest-migration
ndelangen 2afa604
UPDATE almost everything
ndelangen 3556c9b
CHANGE all versions of internal packages to `*`
ndelangen 6c6f5d4
REMOVE npm test script where not needed
ndelangen 3a84022
FIX test with jest
ndelangen fdab656
CHANGE lerna install to hoist by default (faster installs)
ndelangen 1151cba
REMOVE unneeded module && blacklist folder from jest test-detection
ndelangen d34d718
CHANGE travis config to run test sections in parallel (hopefully)
ndelangen 5c042e5
ADD testing for examples
ndelangen a803c85
FIX test
ndelangen 9e53b87
MOVE examples out of packages
ndelangen f74c2a5
MOVE tests next to code && ADD .bettercodehub.yml
ndelangen 57a43b5
Merge branch 'master' into jest-updated
ndelangen 78e9e77
ADD coverage reporting
ndelangen 524e6a9
Merge branch 'jest-updated' of github.com:storybooks/react-storybook …
ndelangen 52ae939
FIX travis.yml
ndelangen 481c4a5
CHANGE package.json ordering of properties
ndelangen 1cbf37b
CHANGE to use yerna over lerna
ndelangen b4cbbbd
CHANGE code coverage to blacklist generators code
ndelangen 50c61f1
MOVE documentation site outside packages
ndelangen a2c7a4a
FIX wrong yerna package
ndelangen 783f342
Revert "FIX wrong yerna package"
ndelangen f87d377
Revert "CHANGE to use yerna over lerna"
ndelangen bfd9d26
Merge branch 'master' into jest-updated
ndelangen 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
component_depth: 2 | ||
languages: | ||
- javascript | ||
|
||
- name: javascript | ||
production: | ||
exclude: | ||
- .*\.test\.js | ||
- .*\/__test__\/.*\.js | ||
- .*\/__mock__\/.*\.js | ||
test: | ||
include: | ||
- .*\.test\.js | ||
- .*\/__test__\/.*\.js |
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,19 @@ | ||
{ | ||
"cacheDirectory": ".jest", | ||
"clearMocks": true, | ||
"moduleNameMapper": { | ||
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/__mocks__/fileMock.js", | ||
"\\.(css|scss)$": "<rootDir>/__mocks__/styleMock.js" | ||
}, | ||
"roots": ["packages"], | ||
"collectCoverage": false, | ||
"collectCoverageFrom": [ | ||
"packages/**/*.{js,jsx}" | ||
], | ||
"coverageDirectory": "coverage", | ||
"testEnvironment": "jsdom", | ||
"setupTestFrameworkScriptFile": "./node_modules/jest-enzyme/lib/index.js", | ||
"snapshotSerializers": [ | ||
"enzyme-to-json/serializer" | ||
] | ||
} |
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 @@ | ||
module.exports = 'file-stub'; |
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 @@ | ||
module.exports = {}; |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes
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,10 @@ | ||
import React from 'react'; | ||
import { storiesOf, action, linkTo } from '@kadira/storybook'; | ||
import Button from './Button'; | ||
import Welcome from './Welcome'; | ||
|
||
storiesOf('Welcome', module).add('to Storybook', () => <Welcome showApp={linkTo('Button')} />); | ||
|
||
storiesOf('Button', module) | ||
.add('with text', () => <Button onClick={action('clicked')}>Hello Button</Button>) | ||
.add('with some emoji', () => <Button onClick={action('clicked')}>😀 😎 👍 💯</Button>); |
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
File renamed without changes.
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 |
---|---|---|
|
@@ -3,6 +3,6 @@ | |
"version": "3.0.0", | ||
"packages": [ | ||
"packages/*", | ||
"packages/examples/*" | ||
"examples/*" | ||
] | ||
} |
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
2 changes: 0 additions & 2 deletions
2
packages/addon-comments/src/manager/components/CommentItem/index.js
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
2 changes: 0 additions & 2 deletions
2
packages/addon-comments/src/manager/components/CommentsPanel/index.js
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
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.
@ndelangen remove
"
marks? see https://docs.travis-ci.com/user/customizing-the-build