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('validator', () => {
|
||||||
describe('domainFormat', () => {
|
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', () => {
|
describe('string contains protocol', () => {
|
||||||
const domain = 'https://mastodon.social'
|
const domain = 'https://mastodon.social'
|
||||||
it('should not match', () => {
|
it('should not match', () => {
|
||||||
|
|
Loading…
Reference in New Issue