camperchan icon indicating copy to clipboard operation
camperchan copied to clipboard

Migrate Test Suite

Open naomi-lgbt opened this issue 1 year ago • 2 comments

This will likely take multiple PRs, but:

  • We should remove the now deprecated discordjs-testing library
  • We should convert vitest to use the expect library, not the assert library
  • We should use vi.mock() to mock discord.js methods and allow us to reach 100% test coverage.

naomi-lgbt avatar Oct 07 '24 17:10 naomi-lgbt

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

a2937 avatar Jan 04 '25 00:01 a2937

expect(value, "custom message").to.be

naomi-lgbt avatar Jan 05 '25 19:01 naomi-lgbt