123456789101112131415161718192021222324252627282930313233343536373839 |
- import { isExternal, isPassword, isNumber } from '@/utils/validate'
- describe('Utils:isExternal', () => {
- it('isExternal', () => {
- expect(isExternal('https://baidu.com')).toBe(true)
- expect(isExternal('baidu.com')).toBe(false)
- })
- })
- describe('Utils:isPassword', () => {
- it('isPassword', () => {
- expect(isPassword('123456')).toBe(true)
- expect(isPassword('12345')).toBe(false)
- })
- })
- describe('Utils:isNumber', () => {
- it('isNumber', () => {
- expect(isNumber('123456')).toBe(true)
- expect(isNumber('abcd')).toBe(false)
- })
- })
|