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

Write tests for @tinyhttp/req #140

Closed
17 tasks
talentlessguy opened this issue Oct 8, 2020 · 4 comments
Closed
17 tasks

Write tests for @tinyhttp/req #140

talentlessguy opened this issue Oct 8, 2020 · 4 comments
Assignees

Comments

@talentlessguy
Copy link
Member

talentlessguy commented Oct 8, 2020

  • req.range
    • should return parsed ranges
    • should cap to the given size
    • should cap to the given size when open-ended
    • should have a .type
    • should accept any type
    • should return undefined if no range
    • with options
      • Should return combined ranges if combine set to true
  • req.is
    • should return the given MIME type when matching
    • should return false when not matching
    • should return false when Content-Type header is not present
    • Should lookup the MIME type with the extension given (e.g. req.is('json')
    • Should ignore charset
    • more coming soon...
  • more coming soon...
@MaurizioPz
Copy link
Contributor

Thanks

talentlessguy pushed a commit that referenced this issue Oct 11, 2020
@talentlessguy
Copy link
Member Author

Closed via #142

@atif-saddique-deel
Copy link

this also should have been covered in tests here.
#407

req.route always returns undefined
https://tinyhttp.v1rtl.site/docs#reqroute

@talentlessguy
Copy link
Member Author

this also should have been covered in tests here.
#407

req.route always returns undefined
https://tinyhttp.v1rtl.site/docs#reqroute

you need to set enableReqRoute to true

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

No branches or pull requests

3 participants