Skip to content

Commit

Permalink
slight update to tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jloleysens committed Oct 19, 2023
1 parent 5cbb75a commit 8654895
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions packages/core/http/core-http-server-internal/src/cdn.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ describe('CdnConfig', () => {
expect(CdnConfig.from({ url }).baseHref).toEqual(expected);
});

it.each([['foo'], ['@#']])('throws for invalid URLs (%p)', (url) => {
it.each([['foo'], ['#!']])('throws for invalid URLs (%p)', (url) => {
expect(() => CdnConfig.from({ url })).toThrow(/Invalid URL/);
});

Expand All @@ -39,14 +39,14 @@ describe('CdnConfig', () => {
});

it('generates the expected CSP additions', () => {
const cdnConfig = CdnConfig.from({ url: 'https://foo.bar' });
const cdnConfig = CdnConfig.from({ url: 'https://foo.bar:9999' });
expect(cdnConfig.getCspConfig()).toEqual({
connect_src: ['foo.bar'],
font_src: ['foo.bar'],
img_src: ['foo.bar'],
script_src: ['foo.bar'],
style_src: ['foo.bar'],
worker_src: ['foo.bar'],
connect_src: ['foo.bar:9999'],
font_src: ['foo.bar:9999'],
img_src: ['foo.bar:9999'],
script_src: ['foo.bar:9999'],
style_src: ['foo.bar:9999'],
worker_src: ['foo.bar:9999'],
});
});

Expand Down

0 comments on commit 8654895

Please sign in to comment.