Tests TODO
The final goal is of this issue is to achieve ~80-100% coverage
here's a todo list of things that require tests (based on the __tests__ folder):
:warning: List is in progress, I'll be adding new test tasks over time, here are some that you can submit already
- [ ] core
- [ ] modules
- [x] accepts
- [x] cookie-signature
- [x] cookie
- [x] etag (#133)
- [x] req (#140)
- [x] res
- [x]
res.format- ifdefaultonly is specified, call it as a function (codecov) - [x]
res.format- if nothing is specified, throw 406 (codecov)
- [x]
- [ ] router
- [x] send (#143)
- [x] wares
- [x] cookie-parser
- [x] cors
- [x] Accept a function to set origin
- [x] dotenv
- [x] favicon
- [x] jwt
- [x] Should work with different algorithms (codecov) [pending]
- [x] logger
- [x] ping
- [x] bot-detector (#111)
- [x] ip-filter
- [x] jsonp (#123)\
If you want to help with tests, write down to this thread with your questions
Thanks for improved coverage for accepts by @BRA1L0R via #97 and #99
Can I try adding tests for bot-detector?
@aneeshrelan yup, will create a separate issue for that now
@aneeshrelan check https://github.com/talentlessguy/tinyhttp/issues/111
@talentlessguy I see some tests for the mentioned wares, are they still needed?
I can take up some tests
@shubhi23994 which tests would you like to take up? I will create a separate issue for those you pick
@aneeshrelan I receive lots of PRs during hacktoberfest so I could have missed some of them
and yes, tests are still needed
I can pick up jsonp to start with
@shubhi23994 alright, making a new issue then :D
@shubhi23994 write in #123 so i can assign you
Hi, may I take pick ETag?
@MaurizioPz yup, pls wait a sec imma setting up a new issue for this (to later assign it to you)
@MaurizioPz check this: #133
Hi, may I take also req
@MaurizioPz alright, making a new issue
@MaurizioPz check #140 and write there pls so I can assign you
Hey, @talentlessguy! I'm not familiar with the codebase, but I'm happy to try writing some tests if you still need it!
@alcar hi! you can pick any of the things to test, and I'll open a separate issue for you - e.g. if you decide to test @tinyhttp/session - I'll create an issue "Write tests for @tinyhttp/session"
pick the one you want and I'll assign you to those tests
Do you have any recommendations for a newcomer? If not, I can just pick up the first available one from the list!
@alcar @tinyhttp/send is quite easy to test, so i'd pick that
but feel free to pick anything else
@talentlessguy Sounds great! Could you please create an issue and assign it to me then?
@alcar yup currently making an issue for you
@alcar here you go -> #143
@talentlessguy I'm happy to pick up a new one if you still need it!
@alcar i will setup an issue for testing @tinyhttp/session for you tomorrow
Would like to help out as well. Anything up for grabs?
@alcar check this => https://github.com/talentlessguy/tinyhttp/issues/163
@KoljaTM @tinyhttp/pug has 0% coverage so you can take it
or other modules with almost 100% coverage, such as @tinyhttp/cors
ok, i'll see what i can do for the pug package