mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-02 08:50:07 +00:00
* test(utils): fix cant import collection * test(rest): await expect * fix(utils): deno compactability * test(utils): typing * fix(utils): add return type
31 lines
977 B
TypeScript
31 lines
977 B
TypeScript
import { expect } from 'chai'
|
|
import { describe, it } from 'mocha'
|
|
// import { validateLength } from '../src/validateLength.js'
|
|
let validateLength: any
|
|
|
|
describe.skip(' ', () => {
|
|
it('[utils] Validate length is too low', () => {
|
|
expect(validateLength('test', { min: 5 })).to.be.equal(false)
|
|
})
|
|
|
|
it('[utils] Validate length is too high', () => {
|
|
expect(validateLength('test', { max: 3 })).to.be.equal(false)
|
|
})
|
|
|
|
it('[utils] Validate length is NOT just right in between.', () => {
|
|
expect(validateLength('test', { min: 5, max: 3 })).to.be.equal(false)
|
|
})
|
|
|
|
it('[utils] Validate length is NOT too low', () => {
|
|
expect(validateLength('test', { min: 3 })).to.be.equal(true)
|
|
})
|
|
|
|
it('[utils] Validate length is NOT too high', () => {
|
|
expect(validateLength('test', { max: 5 })).to.be.equal(true)
|
|
})
|
|
|
|
it('[utils] Validate length is just right in between.', () => {
|
|
expect(validateLength('test', { min: 3, max: 6 })).to.be.equal(true)
|
|
})
|
|
})
|