close
The Wayback Machine - https://web.archive.org/web/20201009061734/https://github.com/talentlessguy/tinyhttp/issues/92
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

Tests TODO #92

Open
talentlessguy opened this issue Oct 1, 2020 · 24 comments
Open

Tests TODO #92

talentlessguy opened this issue Oct 1, 2020 · 24 comments

Comments

@talentlessguy
Copy link
Owner

@talentlessguy talentlessguy commented Oct 1, 2020

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):

⚠️ List is in progress, I'll be adding new test tasks over time, here are some that you can submit already

  • core
    • app
      • app - app.set, app.enable, app.disable (codecov)
      • onError - Test a case where an error doesn't have an HTTP status code, neither is a string (codecov)
    • request
    • response
  • modules
    • accepts
    • cookie-signature
    • cookie
    • etag (#133)
    • req (#140)
    • res
      • res.format - if default only is specified, call it as a function (codecov)
      • res.format - if nothing is specified, throw 406 (codecov)
    • router
    • send (#143)
  • wares
    • cookie-parser
    • cors
      • Accept a function to set origin
    • dotenv
    • favicon
    • jwt
      • Should work with different algorithms (codecov) [pending]
    • logger
    • ping
    • session
      • Cookie - cookie is serialized properly
    • bot-detector (#111)
    • ip-filter
    • jsonp (#123)
    • pug
      • Should set engine for .pug files to renderFile of the pug module

If you want to help with tests, write down to this thread with your questions

@talentlessguy

Loading…

Owner Author

@talentlessguy talentlessguy commented Oct 1, 2020

Thanks for improved coverage for accepts by @BRA1L0R via #97 and #99

@aneeshrelan

Loading…

@aneeshrelan aneeshrelan commented Oct 3, 2020

Can I try adding tests for bot-detector?

@talentlessguy

Loading…

Owner Author

@talentlessguy talentlessguy commented Oct 3, 2020

@aneeshrelan yup, will create a separate issue for that now

@talentlessguy

Loading…

Owner Author

@talentlessguy talentlessguy commented Oct 3, 2020

@aneeshrelan

Loading…

@aneeshrelan aneeshrelan commented Oct 3, 2020

@talentlessguy I see some tests for the mentioned wares, are they still needed?

@shubhi23994

Loading…

@shubhi23994 shubhi23994 commented Oct 3, 2020

I can take up some tests

@talentlessguy

Loading…

Owner Author

@talentlessguy talentlessguy commented Oct 3, 2020

@shubhi23994 which tests would you like to take up? I will create a separate issue for those you pick

@talentlessguy

Loading…

Owner Author

@talentlessguy talentlessguy commented Oct 3, 2020

@aneeshrelan I receive lots of PRs during hacktoberfest so I could have missed some of them

and yes, tests are still needed

@shubhi23994

Loading…

@shubhi23994 shubhi23994 commented Oct 3, 2020

I can pick up jsonp to start with

@talentlessguy

Loading…

Owner Author

@talentlessguy talentlessguy commented Oct 3, 2020

@shubhi23994 alright, making a new issue then :D

@talentlessguy

Loading…

Owner Author

@talentlessguy talentlessguy commented Oct 3, 2020

@shubhi23994 write in #123 so i can assign you

@MaurizioPz

Loading…

Contributor

@MaurizioPz MaurizioPz commented Oct 6, 2020

Hi, may I take pick ETag?

@talentlessguy

Loading…

Owner Author

@talentlessguy talentlessguy commented Oct 7, 2020

@MaurizioPz yup, pls wait a sec imma setting up a new issue for this (to later assign it to you)

@talentlessguy

Loading…

Owner Author

@talentlessguy talentlessguy commented Oct 7, 2020

@MaurizioPz check this: #133

@MaurizioPz

Loading…

Contributor

@MaurizioPz MaurizioPz commented Oct 8, 2020

Hi, may I take also req

@talentlessguy

Loading…

Owner Author

@talentlessguy talentlessguy commented Oct 8, 2020

@MaurizioPz alright, making a new issue

@talentlessguy

Loading…

Owner Author

@talentlessguy talentlessguy commented Oct 8, 2020

@MaurizioPz check #140 and write there pls so I can assign you

@alcar

Loading…

@alcar alcar commented Oct 8, 2020

Hey, @talentlessguy! I'm not familiar with the codebase, but I'm happy to try writing some tests if you still need it!

@talentlessguy

Loading…

Owner Author

@talentlessguy talentlessguy commented Oct 8, 2020

@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

@alcar

Loading…

@alcar alcar commented Oct 8, 2020

Do you have any recommendations for a newcomer? If not, I can just pick up the first available one from the list!

@talentlessguy

Loading…

Owner Author

@talentlessguy talentlessguy commented Oct 8, 2020

@alcar @tinyhttp/send is quite easy to test, so i'd pick that

but feel free to pick anything else

@alcar

Loading…

@alcar alcar commented Oct 8, 2020

@talentlessguy Sounds great! Could you please create an issue and assign it to me then?

@talentlessguy

Loading…

Owner Author

@talentlessguy talentlessguy commented Oct 8, 2020

@alcar yup currently making an issue for you

@talentlessguy

Loading…

Owner Author

@talentlessguy talentlessguy commented Oct 8, 2020

@alcar here you go -> #143

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.