* 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>
16 lines
512 B
TypeScript
16 lines
512 B
TypeScript
import { describe, expect, it } from 'vitest'
|
|
import { getEnvVar, clean } from '../src/utils/index.js'
|
|
|
|
/**
|
|
* MentionClean test suite, tests the clean function
|
|
*
|
|
* @param name name of the test suite
|
|
* @param fn function holding tests to run
|
|
*/
|
|
describe('Mentions Cleaned', () => {
|
|
// test for id removal from message
|
|
it('removes the mention from a message', () => {
|
|
const message = `<@${getEnvVar('CLIENT_UID')}> Hello, World!`
|
|
expect(clean(message)).toBe('Hello, World!')
|
|
})
|
|
}) |