Open mcpenguin opened 1 year ago
Actually, it might be possible to do unit testing with a native Discord.js client as shown here: https://dev.to/heymarkkop/how-to-implement-test-and-mock-discordjs-v13-slash-commands-with-typescript-22lc
However, I do not think it is possible with the Sapphire client. Only when desapphirication is done can we adopt this testing framework.
Description of proposed feature
In previous investigations and research (see #251), it was determined that the Discord.js framework is too cumbersome and coupled to write an effective unit testing framework for it, even with our own wrapper class.
However, another possibility to test the bot is to use integration tests in the form of a "tester" bot interacting with the bot and "listening" for a response. This response can then be compared with the expected behavior for the bot.
If this idea is viable, we can then create a followup epic to add the integration test framework for the bot and go from there.
Acceptance Criteria
A proof of concept application involving the current instance of Codey should be produced, showcasing the ability to
If one or more of the points is impossible, this should be indicated. A partial test framework is better than none.