-
Notifications
You must be signed in to change notification settings - Fork 2
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
Unit testing #1
Comments
This sounds great, but wouldn't this require a test bot to be submitted to each list? Having a bot listed in every list sounds like something that would be difficult to maintain. I'll be cleaning up the code some more this weekend, and doing some manual testing. |
Just as food for thought on test lib, we use Mocha & Chai (chai-http) for testing BotBlock itself (web rendering & API). |
You misunderstood what I meant. In your code, when you send a request to BotBlock, the request would be intercepted by a testing library (I used |
You can relatively easily have unit testing for API requests by using libraries like Sinon. I created a package very similar to this and it had unit testing for nearly every request variation, with around 90% test coverage.
The test code is open source, here's an example file that uses moxios, sinon, and TAP for botlist.space.
The text was updated successfully, but these errors were encountered: