Update validator.spec.ts
This commit is contained in:
parent
ab24d9775f
commit
c599394f40
|
@ -2,6 +2,13 @@ import { domainFormat } from '@/utils/validator'
|
|||
|
||||
describe('validator', () => {
|
||||
describe('domainFormat', () => {
|
||||
describe('single character domain name', () => {
|
||||
const domain = 'c.im'
|
||||
it('should match', () => {
|
||||
const res = domain.search(domainFormat)
|
||||
expect(res).toEqual(0)
|
||||
})
|
||||
})
|
||||
describe('string contains protocol', () => {
|
||||
const domain = 'https://mastodon.social'
|
||||
it('should not match', () => {
|
||||
|
|
Loading…
Reference in New Issue