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

Increase coverage on failing modules - Closes #561 #612

Merged
merged 13 commits into from
Mar 27, 2018

Conversation

faival
Copy link
Contributor

@faival faival commented Mar 26, 2018

What was the problem?

'src/components/setting/setting.js', does not meet coverage threesholds

How did I fix it?

Add missing tests for asserting autoLog, advanceMode, expireTime, settings flags

How to test it?

run the follwoing

npm run test

assert that settings.js shows the following coverage:

94.44% Statements 17/18 87.5% Branches 7/8 88.89% Functions 8/9 94.44% Lines 17/18

Review checklist

const settingsUpdated = sinon.spy();
const accountUpdated = sinon.spy();
Copy link
Contributor

Choose a reason for hiding this comment

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

You can define let accountUpdated here, but sinon.spy(); should be inside of beforeEach. The current way, the same spy is used in all its, so the tests are not isolated and can affect each other.

@faival faival force-pushed the 561-coverage-on-failing-modules branch from 96523a7 to bd6d5cb Compare March 27, 2018 07:26
@faival faival force-pushed the 561-coverage-on-failing-modules branch from bd6d5cb to c477384 Compare March 27, 2018 07:28
Copy link
Contributor

@slaweet slaweet left a comment

Choose a reason for hiding this comment

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

Thank you, Pablo.

@faival faival merged commit 45e4ca9 into 0.4.0 Mar 27, 2018
@faival faival deleted the 561-coverage-on-failing-modules branch March 27, 2018 08:07
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.

3 participants