DNS-over-Discord icon indicating copy to clipboard operation
DNS-over-Discord copied to clipboard

Add unit testing for all routes/interactions

Open MattIPv4 opened this issue 4 years ago • 2 comments
trafficstars

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 avatar Jan 18 '21 14:01 MattIPv4

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

MattIPv4 avatar Jul 05 '21 23:07 MattIPv4

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.

MattIPv4 avatar Jul 14 '21 10:07 MattIPv4