Files
discordeno/tests
Skillz4Killz a0a1554756 refactor: typings using ReturnType (#2105)
* fix: check new types idea

* fix: type errors

* fix: new style

* fix: more cleanup

* fix: more cleanup

* fix: cleanup audit logs

* fix: cleanup stickers

* fix: cleanup integrations

* fix: more cleanup

* fix: organize into 1 place

* fix: few errors

* fix: some broken import fixes

* fix: quite a lot of fixes across the board

* fix: more fixes for broken imports

* fix: more fixes for broken imports

* fix: handler imports

* fix: all remaining import errors

* fix: more errors needing fixes

* fix: clearing up transformers

* fix: few moer types

* fix: more cleanup of extra types

* fix: fmt

* fix: cleanup discordeno file

* Nuke Base Types (#2102)

* fix: cleanup snake stuff

* convert camelCase to snake_case (#2103)

* fix: add camelize

* fix: finalize remaining errors

* fix: imports in test

Co-authored-by: LTS20050703 <87189679+lts20050703@users.noreply.github.com>
2022-03-14 22:11:22 -04:00
..
2022-02-04 15:00:04 +01:00
2022-02-04 15:00:04 +01:00
2022-02-04 15:00:04 +01:00
2022-02-04 15:00:04 +01:00
2022-02-04 15:00:04 +01:00
2022-02-04 15:00:04 +01:00
2021-12-03 18:28:25 +00:00
2021-12-02 16:24:41 +00:00
2022-02-04 15:00:04 +01:00

Discordeno Unit Test Guideline

Unit tests are MANDATORY!

Every time you create a new function in the library, you must also add a unit test for it. A PR should/will not be merged without a valid unit test for it. If you are unable to create a unit test, please leave a comment in your PR asking for help.

Test Locally

You do not need to push to the github repo to have the CI do the tests for you. You can test them locally by doing the following:

DISCORD_TOKEN=YOUR_BOT_TOKEN_HERE deno test --no-check -A tests/mod.ts

Please note that the token you use should be for a trivial unused bot. Never use your main bot tokens for this.

Ordering

The order of unit tests is very important. Please do not move/change the order of the tests unless you know what you are doing. Certain tests depend on other previous tests. You may add a test but becareful where you add it.

Naming

Each function should have it's own separate file for it's tests. The file should be organized under it's main category which will be the [] portion of the tests name. For example, [guild] create a new guild will be found in tests/guilds/create_guild.ts