Skip to content

Commit

Permalink
use a different kind of URL
Browse files Browse the repository at this point in the history
  • Loading branch information
sam-garland committed Oct 21, 2024
1 parent eb94c90 commit a120579
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ describe('UrlUtils', () => {
expect(isHttpOrHttps(new URL('http://www.google.com/'))).toBeTruthy();
});

it('should return false for data: protocol', () => {
const url = getUrl('data:text/plain,some%20data/');
expect(url && isHttpOrHttps(url)).toBeFalsy();
it('should return false for non http-based protocol', () => {
expect(
isHttpOrHttps(new URL('ws://example.com'))
).toBeFalsy();
});
});
});

0 comments on commit a120579

Please sign in to comment.