benbjohnson / benbjohnson/testing

Complete Test Coverage

Open
#8 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
538
Forks
37
PR merge metrics
No merged PRs in 30d

Description

Hello @benbjohnson , I recently came across your article while trying to learn about how to test HTTP packages in Golang, and I think what you did was amazing.

### What I found out

However, the test file content you provided was not fully testing all the scenarios in the function, as I ran the tests and it recorded an `83.3%` coverage of the statements.

### What I did

- I then proceeded to try to generate the coverage file, and just as I suspected, the statement that had not been tested was the `return nil` part.

- I added the test scenario, and now we have a complete `100%` coverage on the test.

### Conclusion

- As I have seen some issues have been created and have stayed open for about half a decade now, I would like to know if it is still being maintained, to add my Pull request to the repository.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.