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

Add end-to-end testing for dig command #68

Open
MattIPv4 opened this issue Oct 10, 2022 · 0 comments
Open

Add end-to-end testing for dig command #68

MattIPv4 opened this issue Oct 10, 2022 · 0 comments
Labels
enhancement New feature or request hacktoberfest help wanted Extra attention is needed

Comments

@MattIPv4
Copy link
Owner

MattIPv4 commented Oct 10, 2022

For now, I'm only worried about testing the dig command. This will lay the ground-work for testing other commands down the road.

Implement end-to-end testing that simulates a valid interaction call from Discord to the worker (likely using wrangler in the dry-run mode and miniflare to run it in a simulated Workers environment), and ensure that the expected response is received. This will also need network calls mocked so that we can ensure the correct follow-up API calls are made to Discord, as the dig command handles responding asynchronously after the request.

To be clear, this is a pretty complex issue that involves setting up all the ground-work for testing in this repo, as well as fully mocking the Discord API calls involved in the interactions flow.

The end goal here is to have a test suite that can call the dig command (with any domain, any types, any options) as if it were a Discord user running a command, and we can validate that the bot will respond as we expect.

@MattIPv4 MattIPv4 added enhancement New feature or request help wanted Extra attention is needed hacktoberfest labels Oct 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request hacktoberfest help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant