-
Notifications
You must be signed in to change notification settings - Fork 3
Testing
Reflectcord comes with tests built into it, powered by Jest. It aims to cover most of the Discord API for accuracy, regressions, and missing endpoints.
Running the test suite is easy. Simply run npm test
, or npx jest
to get started.
Make sure that you don't build the server though, otherwise the tests will run twice due to Jest automatically detecting the dist folder.
In case you already did, simply use npm run clean
to delete the build files.
Reflectcords tests can also be used on other backend implementations, such as Fosscord. This is beneficial to both the developers of Reflectcord, and other backends, as it helps both parties recognize what API calls are missing or incorrect, and even diagnose errors within the tests themselves.
If possible, you should run the test suite with Reflectcord configured to use a self-hosted Revolt instance.
This is to avoid causing unnecessary stress on an actual production instance. It's probably fine if you don't, but more preferable if you do.