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

test: achieve 100% code coverage #196

Merged
merged 20 commits into from Nov 24, 2021
Merged

Conversation

darkgl0w
Copy link
Member

@darkgl0w darkgl0w commented Nov 23, 2021

Hello,

  • reaching 100% code coverage (fix 100% code coverage #112)
  • remove superfluous and dead code
  • add adm-zip as a new dev-dep in order to test a specific use case
  • remove the check preventing multiple onSend hook triggers as it was fixed in fastify upstream (possible regressions are monitored by a test case)

This PR needs a little bit of work to be completed but early reviews are welcome ^^
EDIT: it is now ready to be reviewed

Note : Tests and files should be reorganized and structured but I will do this in a new PR (reviewing will be a pain otherwise).
To be done :

  • Reorganize test files (renaming following xxx.test.js convention)
  • Reorganize tests (making groups with sub-tests)
  • Maybe going full async/await syntax test path
  • Improve typescript types and tests (should investigate a bit more about what can be done)
  • Improve the documentation

main branch :

  🌈 SUMMARY RESULTS 🌈  

Suites:   ​4 passed​, ​4 of 4 completed​
Asserts:  ​​​341 passed​, ​of 341​
​Time:​   ​9s​
----------|---------|----------|---------|---------|---------------------------------------------------------------------
File      | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s                                                   
----------|---------|----------|---------|---------|---------------------------------------------------------------------
All files |   92.01 |    83.41 |   89.18 |    93.2 |                                                                     
 index.js |   92.01 |    83.41 |   89.18 |    93.2 | 127,129,137,169,189,197,199,215,217,282,284,371-374,484-485,510-511 
----------|---------|----------|---------|---------|---------------------------------------------------------------------

after :

  🌈 SUMMARY RESULTS 🌈
​
Suites:   ​4 passed​, ​4 of 4 completed​
Asserts:  444 passed​, ​of 444​
​Time:​   ​10s​
----------|---------|----------|---------|---------|-------------------
File      | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
----------|---------|----------|---------|---------|-------------------
All files |     100 |      100 |     100 |     100 |                   
 index.js |     100 |      100 |     100 |     100 |
----------|---------|----------|---------|---------|-------------------

Checklist

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

good work!

@darkgl0w darkgl0w marked this pull request as ready for review November 24, 2021 11:26
@darkgl0w darkgl0w changed the title test: improve coverage (WIP) test: achieve 100% code coverage Nov 24, 2021
@darkgl0w
Copy link
Member Author

darkgl0w commented Nov 24, 2021

The PR is ready for reviews.

@mcollina
Copy link
Member

Thanks, this is amazing!

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm

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.

100% code coverage
2 participants