Closed kevinthedang closed 1 month ago
Looked into creating tests using vitest
. It does not seem to be useful for now. Will probably look into this later. Typically we will also be testing features before releasing them. Only possibly problem is package deprecation.
Gonna reopen this so we really can have some kind of code coverage for the project to ensure certain parts are working as intended.
Currently we should add these testing dependencies
npm install --save-dev jest @types/jest ts-jest
File Structure Options:
tests
and src
directories. src
directory so they are as close as possible to code that will be tested.Also, let's plan to test the TS source code before it is compiled over to JS. This ensures we are testing the code itself.
Update
Gonna reopen this so we really can have some kind of code coverage for the project to ensure certain parts are working as intended.
- We will try to use jest with TypeScript
- We also need to make sure we follow this for ECMAScript
- Mock Testing will be important
- Future thing to consider ---> Redis Testing
Currently we should add these testing dependencies
npm install --save-dev jest @types/jest ts-jest
Mocking with DiscordJS is currently in development with this open-source project called gauntlet
vitest
for non-discordjs classes, methods, and features startedREADME.md
.
Issue
Solution
ready.ts
)messageCreate.ts
interactionCreate.ts
README.md
and the code coverage of the codebase