fac30sb / discord-chatbot-emma-egbie

0 stars 0 forks source link

Test bot initialisation and login #46

Closed blackNoir2 closed 7 months ago

blackNoir2 commented 7 months ago

The issue we encountered was with the behaviour of the Client.ready function. Although it correctly initialized the variable and resolved using the promise, it caused the test suite to hang (or freeze) after returning the correct test result. Consequently, no other tests could run.

To address this problem, I implemented a mock version of the Client.ready function. By creating a mock object that simulated the behaviour of the Client.ready function thus prevent the test suite from hanging, thereby resolving the issue. Now all tests have run

Here is a video of the tests passing. https://www.youtube.com/watch?v=K7LsesJekAg