Skip to content

Commit

Permalink
fix: expect error in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
zeyu2001 committed Jul 31, 2024
1 parent 6761eff commit 5d1ba3f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/validators/src/__tests__/email.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ describe('EmailValidator that disallows subdomains', () => {

describe('EmailValidator with invalid options', () => {
it('should throw an error for invalid options', () => {
// @ts-expect-error Testing invalid options
expect(() => new EmailValidator({ domains: 'gov.sg' })).toThrowError(
OptionsError,
)
Expand Down
3 changes: 2 additions & 1 deletion packages/validators/src/__tests__/url.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { describe, expect, it } from 'vitest'

import { OptionsError } from '@/common/errors'
import { UrlValidator } from '@/url'
import { OptionsError, UrlValidationError } from '@/url/errors'
import { UrlValidationError } from '@/url/errors'

describe('UrlValidator with default options', () => {
const validator = new UrlValidator()
Expand Down

0 comments on commit 5d1ba3f

Please sign in to comment.