Skip to content
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

Fabo/1379 remove errors in tests #1782

Merged
merged 11 commits into from
Jan 5, 2019
Merged

Conversation

faboweb
Copy link
Collaborator

@faboweb faboweb commented Jan 3, 2019

Closes #1379

Description:

❤️ Thank you!


  • Added entries in CHANGELOG.md with issue # and GitHub username
  • Reviewed Files changed in the github PR explorer

@faboweb faboweb requested a review from nylira as a code owner January 3, 2019 11:20
@codecov
Copy link

codecov bot commented Jan 3, 2019

Codecov Report

Merging #1782 into develop will decrease coverage by 0.2%.
The diff coverage is 100%.

@@             Coverage Diff             @@
##           develop    #1782      +/-   ##
===========================================
- Coverage    95.07%   94.86%   -0.21%     
===========================================
  Files          122      122              
  Lines         2982     2982              
  Branches       128      128              
===========================================
- Hits          2835     2829       -6     
- Misses         137      143       +6     
  Partials        10       10
Impacted Files Coverage Δ
app/src/renderer/vuex/modules/blockchain.js 100% <100%> (ø) ⬆️
app/src/renderer/vuex/modules/notifications.js 85% <0%> (-15%) ⬇️

@codecov
Copy link

codecov bot commented Jan 3, 2019

Codecov Report

Merging #1782 into develop will decrease coverage by 0.2%.
The diff coverage is 100%.

@@             Coverage Diff             @@
##           develop    #1782      +/-   ##
===========================================
- Coverage    95.07%   94.86%   -0.21%     
===========================================
  Files          122      122              
  Lines         2982     2982              
  Branches       128      128              
===========================================
- Hits          2835     2829       -6     
- Misses         137      143       +6     
  Partials        10       10
Impacted Files Coverage Δ
app/src/renderer/vuex/modules/blockchain.js 100% <100%> (ø) ⬆️
app/src/renderer/vuex/modules/notifications.js 85% <0%> (-15%) ⬇️

test/unit/specs/store/user.spec.js Outdated Show resolved Hide resolved
test/unit/specs/store/user.spec.js Show resolved Hide resolved
@sabau
Copy link
Contributor

sabau commented Jan 4, 2019

That's Unit testing 👍

await TmSessionSignIn.methods.onSubmit.call(self)
expect($store.commit).toHaveBeenCalledWith(`notifyError`, {
title: `Signing In Failed`,
body: expect.stringContaining(`Planned rejection`)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks weird at first sight, but it's actually nice

Copy link
Contributor

@sabau sabau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the direction towards more Unit oriented tests, if you have time we can change some let to const, otherwise let's merge as is 👍

@@ -69,16 +69,27 @@ describe(`TmSessionSignIn`, () => {
})

it(`should show a notification if signin failed`, async () => {
store.dispatch = jest.fn(() => Promise.reject(`Planned rejection`))
wrapper.setData({
let $store = {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor: let can be changed to const if we don't plan to reassign those variables, there are some of those along the PR

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fedekunze fedekunze mentioned this pull request Jan 5, 2019
@faboweb
Copy link
Collaborator Author

faboweb commented Jan 5, 2019

Will merge and we can switch the rule on after deciding so in Tuesdays meeting. 👍

@faboweb faboweb merged commit d85c8d7 into develop Jan 5, 2019
@faboweb faboweb deleted the fabo/1379-remove-errors-in-tests branch January 5, 2019 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

console errors when running test
4 participants