-
Notifications
You must be signed in to change notification settings - Fork 53
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
Write tests with jest (Coverage 100%) #15
Conversation
add jest add test with jest script test styled-components 4.0.2 bump babel & rollup to latest versions update .babelrc to .babelrc.js, inlude in .babelrc update rollup config update rollup config to new format dump .babelrc in favor of .babelrc.js fix last warnings in yarn build for rollup.config.js update packe-lock.json clean package.json add jest, write first tests add react & react-dom as styled-components now needs them (16.6.0) add @babel/preset-react, jest-styled-components & react-test-renderer - index.test not running add React to index.test run test with jsx move tests to own folder push branch ratio to 80%
# Conflicts: # .babelrc.js # package-lock.json # package.json # yarn.lock
@timhagn do you think you can resolve the conflicts and rebase? that'd be helpful! but if you can't no worries :) |
add jest add test with jest script test styled-components 4.0.2 bump babel & rollup to latest versions update .babelrc to .babelrc.js, inlude in .babelrc update rollup config update rollup config to new format dump .babelrc in favor of .babelrc.js fix last warnings in yarn build for rollup.config.js update packe-lock.json clean package.json add jest, write first tests add react & react-dom as styled-components now needs them (16.6.0) add @babel/preset-react, jest-styled-components & react-test-renderer - index.test not running add React to index.test run test with jsx move tests to own folder push branch ratio to 80%
… into th-jest-tests
#done : ) |
package.json
Outdated
"styled-components": ">= 1 < 4" | ||
"react": ">= 16.3.0", | ||
"react-dom": ">= 16.3.0", | ||
"styled-components": ">= 4" |
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.
Looks like to me this branch is not against the master?
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.
Oh, had merged my latest master before the merge, but not afterwards.
Should be fixed now, unless you see more problems GitHub doesn't ; ).
@timhagn Tim, please add your name into AUTHORS file. Also, I see @ApacheEx isn't there too. That's meant to have everyone. Can you double check if this branch is rebased with current master? I see some unnecessary and outdated conflicts. For example the version range of styled-components doesn't match :) |
@morajabi Added myself to the AUTHORS file and updated the branch. |
Will close this for now and open another, less intrusive one : ). |
As promised, here the tests written in jest.
Created a second pull request, so that you have it easier to test your workflow with the
updated dependencies.
For the tests to work I did the following:
react-test-renderer (^16.6.0), @babel/preset-react (^7.0.0), babel-jest (^23.6.0) &
babel-core (^7.0.0-bridge.0, needed for jest to work flawlessly with Babel 7) as devDependencies
Branch Coverage @ 80%)
Branch Coverage @ 83.33%)
Things that might be further done:
I have no clue at the moment, how this could be done)
"Breaking" changes:
for styled-components v4, too, Users should already have them, as mentioned in the last PR
I squashed the commits for your convenience.
Edit: Nearly forgot: This PR closes #1