Closed gurgunday closed 1 year ago
Not related, but having trouble understanding this coverage report, these uncovered lines are literally covered?
# time=10834.974ms
--------------------------|---------|----------|---------|---------|-------------------
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
--------------------------|---------|----------|---------|---------|-------------------
All files | 98.44 | 96.26 | 100 | 100 |
fastify-rate-limit | 100 | 98.24 | 100 | 100 |
index.js | 100 | 98.24 | 100 | 100 | 159-167
Those lines do not look like to be covered in the sense that the "else" of the if is never exerciesed
If you run the test locally than if the lines are red, it means uncovere lines. Like a if clause not met. If it is yellow it means uncovered branch like var1 || var2, where var1 is covered but var2 not.
Today I learned 😁
Thanks for the info!
The old ms is being replaced with this one in most fastify plugins
Reference: https://github.com/fastify/fastify-sensible/pull/132
TLDR: it's faster
Checklist
npm run test
andnpm run benchmark