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

Improve test coverage of createSet #80

Merged
merged 1 commit into from Aug 22, 2019

Conversation

mroderick
Copy link
Member

This PR adds explicit tests of createSet to get it's coverage to 100%.

Purpose (TL;DR) - mandatory

Trying to get test coverage to 100%, so we can lock it there.

Solution - optional

  • Upgrade @sinonjs/referee to latest to get the isSet assertion
  • Add tests

How to verify - mandatory

  1. Check out this branch
  2. npm install
  3. Put a .only in the first describe in create-set.test.js
  4. npm run test-coverage
  5. Observe that the test coverage of createSet is 100%, when only its tests are run
-----------------------|----------|----------|----------|----------|-------------------|
File                   |  % Stmts | % Branch |  % Funcs |  % Lines | Uncovered Line #s |
-----------------------|----------|----------|----------|----------|-------------------|
All files              |    31.78 |     4.78 |     8.41 |    31.78 |                   |
 create-set.js         |      100 |      100 |      100 |      100 |                   |
 deep-equal.js         |       26 |        0 |    16.67 |       26 |... 32,233,240,252 |
 get-class.js          |    66.67 |      100 |        0 |    66.67 |                 9 |
 identical.js          |       50 |        0 |        0 |       50 |          18,19,22 |
 is-arguments.js       |    15.38 |        0 |        0 |    15.38 |... 26,27,28,30,32 |
 is-date.js            |       50 |      100 |        0 |       50 |                 4 |
 is-element.js         |    22.22 |    28.57 |        0 |    22.22 |... 18,19,20,22,24 |
 is-map.js             |       50 |        0 |        0 |       50 |                 4 |
 is-nan.js             |    33.33 |        0 |        0 |    33.33 |               7,8 |
 is-neg-zero.js        |       50 |        0 |        0 |       50 |                10 |
 is-object.js          |       50 |        0 |        0 |       50 |                11 |
 is-set.js             |       50 |        0 |        0 |       50 |                 4 |
 is-subset.js          |       20 |        0 |        0 |       20 |... ,9,10,11,14,17 |
 iterable-to-string.js |    23.53 |        0 |        0 |    23.53 |... 33,34,37,38,41 |
 match.js              |    19.35 |        0 |    33.33 |    19.35 |... 19,123,126,129 |
 matcher.js            |    32.73 |     6.72 |     6.49 |    32.73 |... 47,454,455,458 |
 samsam.js             |      100 |      100 |      100 |      100 |                   |
-----------------------|----------|----------|----------|----------|-------------------|

Checklist for author

  • npm run lint passes
  • References to standard library functions are cached.

Upgrade `@sinonjs/referee` to latest to get the `isSet` assertion
@mroderick mroderick force-pushed the improve-coverage-of-create-set branch from 57e1ad4 to 00936c2 Compare August 22, 2019 06:01
@coveralls
Copy link

Pull Request Test Coverage Report for Build 310

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.4%) to 98.389%

Totals Coverage Status
Change from base Build 308: 0.4%
Covered Lines: 465
Relevant Lines: 472

💛 - Coveralls

@mroderick mroderick merged commit 3161c93 into sinonjs:master Aug 22, 2019
@mroderick mroderick deleted the improve-coverage-of-create-set branch August 22, 2019 07:41
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.

None yet

2 participants