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 bot-detector #111

Closed
3 tasks
talentlessguy opened this issue Oct 3, 2020 · 6 comments
Closed
3 tasks

Write tests for bot-detector #111

talentlessguy opened this issue Oct 3, 2020 · 6 comments
Assignees
Labels

Comments

@talentlessguy
Copy link
Member

talentlessguy commented Oct 3, 2020

Write tests for @tinyhttp/bot-detector using supertest-fetch (that is used in other tests)

The module is quite small, so a little things have to be tested:

  • It doesn't identify browser UserAgent as a bot
  • It identifies Google crawler as a bot
  • it identifies node request as a bot
@aneeshrelan
Copy link

@talentlessguy Can you please assign this to me? Thanks!

@talentlessguy
Copy link
Member Author

@aneeshrelan done

@aneeshrelan
Copy link

@talentlessguy For the 3rd task, "it doesn't identify node request as a bot", I'm not quite sure if I get this correctly, do we mean the request generated by the supertest-fetch? If yes, the user-agent comes out to be node-fetch/1.0 (+https://github.com/bitinn/node-fetch) which is being termed as a bot by the middleware

@talentlessguy
Copy link
Member Author

talentlessguy commented Oct 3, 2020

@aneeshrelan my bad, it should identify as a bot (fixed the issue checklist now)

@aneeshrelan
Copy link

No worries. Have put up #112 to add tests

@talentlessguy
Copy link
Member Author

Closed via #112

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

No branches or pull requests

2 participants