Files

40 lines
867 B
TypeScript
Raw Permalink Normal View History

// @ts-nocheck
import { isExternal, isNumber, isPassword } from '@/utils/validate'
/**
* @description
* @param path
* @returns {boolean}
*/
describe('Utils:isExternal', () => {
it('isExternal', () => {
expect(isExternal('https://baidu.com')).toBe(true)
expect(isExternal('baidu.com')).toBe(false)
})
})
/**
* @description 6
* @param value
* @returns {boolean}
*/
describe('Utils:isPassword', () => {
it('isPassword', () => {
expect(isPassword('123456')).toBe(true)
expect(isPassword('12345')).toBe(false)
})
})
/**
* @description
* @param value
* @returns {boolean}
*/
describe('Utils:isNumber', () => {
it('isNumber', () => {
expect(isNumber('123456')).toBe(true)
expect(isNumber('abcd')).toBe(false)
})
})