-
Notifications
You must be signed in to change notification settings - Fork 105
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 code coverage (even if just by a little bit) #136
Comments
PR to test |
picking this up |
@tux7P Yay! I'll assign it to you now. I'd also like to note that Hacktoberfest officially kicks off on October 1st. Contributions made before the event may not be eligible for the challenge. However, feel free to start working on it, but I'd recommend holding off on submitting your PR until the event begins.
Good Luck 🍁 |
More than one person can work on this issue, feel free to comment "picking this up" if it interest you! 🍁 |
@EbonyLouis, picking this up! |
This commit adds new tests in did-resolver.spec.ts to cover some of the previously uncovered error-related branching paths. This commit contributes partly to issue decentralized-identity#136. Based on the output of `npm run test:node` before vs. after this commit, the `% Branch` is now increased by 9.66 percentage points, and the `% Stmt` and `% Lines` by 3.29 percentage points. Before: ``` did-resolver.ts | 87.91 | 78.57 | 66.66 | 87.91 ``` After: ``` did-resolver.ts | 91.2 | 88.23 | 66.66 | 91.2 | ```
Heyy @tux7P how are things going with this issue? Is this something you still want to work on? |
This commit adds new tests in did-resolver.spec.ts to cover some of the previously uncovered error-related branching paths. This commit contributes partly to issue decentralized-identity#136. Based on the output of `npm run test:node` before vs. after this commit, the `% Branch` is now increased by 9.66 percentage points, and the `% Stmt` and `% Lines` by 3.29 percentage points. Before: ``` did-resolver.ts | 87.91 | 78.57 | 66.66 | 87.91 ``` After: ``` did-resolver.ts | 92.34 | 94.11 | 66.66 | 92.34 | ```
This commit adds new tests in did-resolver.spec.ts to cover some of the previously uncovered error-related branching paths. This commit contributes partly to issue decentralized-identity#136. Based on the output of `npm run test:node` before vs. after this commit, the `% Branch` is now increased by 9.66 percentage points, and the `% Stmt` and `% Lines` by 3.29 percentage points. Before: ``` did-resolver.ts | 87.91 | 78.57 | 66.66 | 87.91 ``` After: ``` did-resolver.ts | 92.34 | 94.11 | 66.66 | 92.34 | ```
* Add tests for error cases in did-resolver.spec.ts This commit adds new tests in did-resolver.spec.ts to cover some of the previously uncovered error-related branching paths. This commit contributes partly to issue #136. Based on the output of `npm run test:node` before vs. after this commit, the `% Branch` is now increased by 9.66 percentage points, and the `% Stmt` and `% Lines` by 3.29 percentage points. Before: ``` did-resolver.ts | 87.91 | 78.57 | 66.66 | 87.91 ``` After: ``` did-resolver.ts | 91.2 | 88.23 | 66.66 | 91.2 | ``` * Add tests for error cases in did-resolver.spec.ts This commit adds new tests in did-resolver.spec.ts to cover some of the previously uncovered error-related branching paths. This commit contributes partly to issue #136. Based on the output of `npm run test:node` before vs. after this commit, the `% Branch` is now increased by 9.66 percentage points, and the `% Stmt` and `% Lines` by 3.29 percentage points. Before: ``` did-resolver.ts | 87.91 | 78.57 | 66.66 | 87.91 ``` After: ``` did-resolver.ts | 92.34 | 94.11 | 66.66 | 92.34 | ``` * Add tests for error cases in did-resolver.spec.ts This commit adds new tests in did-resolver.spec.ts to cover some of the previously uncovered error-related branching paths. This commit contributes partly to issue #136. Based on the output of `npm run test:node` before vs. after this commit, the `% Branch` is now increased by 9.66 percentage points, and the `% Stmt` and `% Lines` by 3.29 percentage points. Before: ``` did-resolver.ts | 87.91 | 78.57 | 66.66 | 87.91 ``` After: ``` did-resolver.ts | 92.34 | 94.11 | 66.66 | 92.34 | ``` * Arrange new Did related error codes alphabetically * Use a different code for DidNotString
@EbonyLouis picking this up ! |
picking this up |
.take |
The issue you are trying to assign to yourself is already assigned. |
Can I still pick this up? @EbonyLouis |
@ANIRUDH-333, yes! I just assigned it to you thank you for contributing ✨ |
Resolves #136 Completely covers the `ed25519.ts` file with 100% coverage. | File Name | Statements | Branches | Functions | Lines | |--------------------|------------|----------|-----------|--------| | **Before:** | | | | | | All files | 99.05 | 97.55 | 96.04 | 99.05 | | ed25519.ts | 93.1 | 88.88 | 83.33 | 93.1 | | **After:** | | | | | | All files | 99.09 | 97.6 | 96.25 | 99.09 | | ed25519.ts | 100 | 100 | 100 | 100 |
Resolves #136 Improves the test coverage in `blockstore-mock.ts` from 51.25% to 85% | File Name | Statements | Branches | Functions | Lines | |----------------------|------------|----------|-----------|--------| | **Before:** | | | | | | All files | 99.05 | 97.55 | 96.04 | 99.05 | | blockstore-mock.ts | 51.25 | 100 | 8.33 | 51.25 | | **After:** | | | | | | All files | 99.29 | 97.57 | 97.7 | 99.29 | | blockstore-mock.ts | 85 | 100 | 75 | 85 |
Background:
The code coverage goal is 100% for this repo, so any PR adding any test to increase the overall code coverage would be super useful!
Task Details:
To know what code hasn't been covered:
npm run test:node
coverage/index.html
page, it will show you precisely what line of code is not coveredFiles that can be ignored as they will likely be undergoing drastic changes:
permissions-request.ts
Picking Up This Issue:
Questions:
#hack-together
channel and collaborate with a buddy.#getting-started
channel.Resources:
Remember, communication is key! If you have any questions or face any challenges, we're here to help so please don't hesitate to reach out.
Good Luck! 🍁
The text was updated successfully, but these errors were encountered: