mirror of
https://github.com/kevinthedang/discord-ollama.git
synced 2025-12-12 11:56:06 -05:00
* Add: skeleton suite for command tests (#119) * test naming updated * fix imports, remove old references * added code coverage badge * Add: coverage environment * Fix: Readme hyperlink to coverage workflow * grab coverage pct from env * Update: gist hyperlink * color range on coverage * fix contributing, simplify coverage assessment * lmiit coverage to master, add branch naming conventions --------- Co-authored-by: Kevin Dang <77701718+kevinthedang@users.noreply.github.com>
23 lines
767 B
TypeScript
23 lines
767 B
TypeScript
import { describe, expect, it } from 'vitest'
|
|
import events from '../src/events/index.js'
|
|
|
|
/**
|
|
* Events test suite, tests the events object
|
|
* Each event is to be tested elsewhere, this file
|
|
* is to ensure that the events object is defined.
|
|
*
|
|
* @param name name of the test suite
|
|
* @param fn function holding tests to run
|
|
*/
|
|
describe('Events Existence', () => {
|
|
// test definition of events object
|
|
it('references defined object', () => {
|
|
expect(typeof events).toBe('object')
|
|
})
|
|
|
|
// test specific events in the object
|
|
it('references specific events', () => {
|
|
const eventsString = events.map(e => e.key.toString()).join(', ')
|
|
expect(eventsString).toBe('ready, messageCreate, interactionCreate, threadDelete')
|
|
})
|
|
}) |