Skip to content

Commit

Permalink
Apply suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
ardatan committed Jan 30, 2025
1 parent 43ad816 commit 0293c7e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/utils/tests/helpers.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,10 @@ describe('isUrl', () => {
expect(isUrl(url)).toBe(true);
});

it.each(['not-a-url', 'invalid://host', 'http://[invalid]'])(
it.each(['not-a-url', 'invalid://host', 'http://[invalid]', 1, false, {}])(
'should reject invalid URL: %s',
url => {
// @ts-expect-error - Testing
expect(isUrl(url)).toBe(false);
},
);
Expand Down Expand Up @@ -76,7 +77,7 @@ describe('isUrl', () => {

beforeAll(() => {
// @ts-expect-error - Remove URL.canParse
delete URL.canParse;
URL.canParse = undefined;
});

afterAll(() => {
Expand Down

0 comments on commit 0293c7e

Please sign in to comment.