kevinthedang / discord-ollama

Discord Bot that utilizes Ollama to interact with any Large Language Models to talk with users and allow them to host/create their own models.
Creative Commons Attribution 4.0 International
45 stars 5 forks source link

Unit Testing #14

Closed kevinthedang closed 1 month ago

kevinthedang commented 5 months ago

Issue

Solution

kevinthedang commented 5 months 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.

kevinthedang commented 2 months ago

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.

Currently we should add these testing dependencies

npm install --save-dev jest @types/jest ts-jest
JT2M0L3Y commented 1 month ago

File Structure Options:

JT2M0L3Y commented 1 month ago

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.

JT2M0L3Y commented 1 month ago

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.

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

JT2M0L3Y commented 1 month ago

Update