Files
discordeno/packages/utils/tests/token.spec.ts
Jonathan Ho eaf8782d34 test: fix rest and utils test (#2723)
* test(utils): fix  cant import collection

* test(rest): await expect

* fix(utils): deno compactability

* test(utils): typing

* fix(utils): add return type
2023-01-15 11:04:20 -06:00

14 lines
491 B
TypeScript

import { expect } from 'chai'
import { describe, it } from 'mocha'
import { removeTokenPrefix } from '../src/token.js'
describe('token.ts', () => {
it('[token] Remove token prefix when Bot is prefixed.', () => {
expect(removeTokenPrefix('Bot discordeno is best lib')).to.be.equal('discordeno is best lib')
})
it('[token] Remove token prefix when Bot is NOT prefixed.', () => {
expect(removeTokenPrefix('discordeno is best lib')).to.be.equal('discordeno is best lib')
})
})