MattIPv4 / DNS-over-Discord

1.1.1.1 works from a Discord server, thanks to the 1.1.1.1 bot. Invite the bot to your Discord server to start using DNS over Discord.
https://dns-over-discord.v4.wtf/invite
Apache License 2.0
281 stars 28 forks source link

Add unit testing for all routes/interactions #25

Closed MattIPv4 closed 1 year ago

MattIPv4 commented 3 years ago

Using https://github.com/dollarshaveclub/cloudworker, unit tests should be implemented for all the HTTP routes in the worker.

For interactions, there should be unit tests to ensure that the verification middleware works as expected, and then unit tests should be provided for each command in the interactions app.

MattIPv4 commented 3 years ago

Given that cloudworker is now abandonware, using https://miniflare.dev/recipes/ava.html is likely a better bet here.

MattIPv4 commented 3 years ago

Started work on this in https://github.com/MattIPv4/DNS-over-Discord/tree/testing -- will likely implement the patterns needed for testing & add basic tests for http routes, but create a follow-up issue for testing the actual interactions logic.