camperchan
camperchan copied to clipboard
Migrate Test Suite
This will likely take multiple PRs, but:
- We should remove the now deprecated
discordjs-testinglibrary - We should convert vitest to use the
expectlibrary, not theassertlibrary - We should use
vi.mock()to mock discord.js methods and allow us to reach 100% test coverage.
We should convert vitest to use the expect library, not the assert library
Can you help me verify that it's a good idea to do this? I was part through when I realized some of the expect calls aren't exactly one to one and don't seem to have a way of adding a special message.
For example: https://github.com/freecodecamp/camperchan/blob/1fbe4a2b50fdaa126a8fcb0659ffb49bab3c1c23/test/modules/createLogFile.spec.ts#L17
expect(value, "custom message").to.be