diff options
Diffstat (limited to 'packages/integrations/netlify/test/functions')
4 files changed, 22 insertions, 22 deletions
diff --git a/packages/integrations/netlify/test/functions/cookies.test.js b/packages/integrations/netlify/test/functions/cookies.test.js index 9d2565d91..c8f409eec 100644 --- a/packages/integrations/netlify/test/functions/cookies.test.js +++ b/packages/integrations/netlify/test/functions/cookies.test.js @@ -15,12 +15,12 @@ describe( it('Can set multiple', async () => { const entryURL = new URL( './fixtures/cookies/.netlify/v1/functions/ssr/ssr.mjs', - import.meta.url + import.meta.url, ); const { default: handler } = await import(entryURL); const resp = await handler( new Request('http://example.com/login', { method: 'POST', body: '{}' }), - {} + {}, ); assert.equal(resp.status, 301); assert.equal(resp.headers.get('location'), '/'); @@ -30,7 +30,7 @@ describe( it('renders dynamic 404 page', async () => { const entryURL = new URL( './fixtures/cookies/.netlify/v1/functions/ssr/ssr.mjs', - import.meta.url + import.meta.url, ); const { default: handler } = await import(entryURL); const resp = await handler( @@ -39,7 +39,7 @@ describe( 'x-test': 'bar', }, }), - {} + {}, ); assert.equal(resp.status, 404); const text = await resp.text(); @@ -49,5 +49,5 @@ describe( }, { timeout: 120000, - } + }, ); diff --git a/packages/integrations/netlify/test/functions/edge-middleware.test.js b/packages/integrations/netlify/test/functions/edge-middleware.test.js index 683ec3b01..ae06a9f6f 100644 --- a/packages/integrations/netlify/test/functions/edge-middleware.test.js +++ b/packages/integrations/netlify/test/functions/edge-middleware.test.js @@ -18,7 +18,7 @@ describe( it('emits no edge function', async () => { assert.equal( fixture.pathExists('../.netlify/v1/edge-functions/middleware/middleware.mjs'), - false + false, ); }); @@ -44,7 +44,7 @@ describe( it('emits an edge function', async () => { const contents = await fixture.readFile( - '../.netlify/v1/edge-functions/middleware/middleware.mjs' + '../.netlify/v1/edge-functions/middleware/middleware.mjs', ); assert.equal(contents.includes('"Hello world"'), false); }); @@ -62,5 +62,5 @@ describe( }, { timeout: 120000, - } + }, ); diff --git a/packages/integrations/netlify/test/functions/image-cdn.test.js b/packages/integrations/netlify/test/functions/image-cdn.test.js index 45b41e4de..0348ea656 100644 --- a/packages/integrations/netlify/test/functions/image-cdn.test.js +++ b/packages/integrations/netlify/test/functions/image-cdn.test.js @@ -67,24 +67,24 @@ describe( assert.equal( domain.test('https://www.example.net/image.jpg'), false, - 'subdomain should not match' + 'subdomain should not match', ); assert.equal(domain.test('http://example.net/image.jpg'), true, 'http should match'); assert.equal( domain.test('https://example.net/subdomain/image.jpg'), true, - 'subpath should match' + 'subpath should match', ); const subdomain = regexes[1]; assert.equal( subdomain.test('https://secret.example.edu/image.jpg'), true, - 'should match subdomains' + 'should match subdomains', ); assert.equal( subdomain.test('https://secretxexample.edu/image.jpg'), false, - 'should not use dots in domains as wildcards' + 'should not use dots in domains as wildcards', ); }); @@ -93,22 +93,22 @@ describe( assert.equal( patterns.test('https://example.org/images/1.jpg'), true, - 'should match domain' + 'should match domain', ); assert.equal( patterns.test('https://www.example.org/images/2.jpg'), true, - 'www subdomain should match' + 'www subdomain should match', ); assert.equal( patterns.test('https://www.subdomain.example.org/images/2.jpg'), false, - 'second level subdomain should not match' + 'second level subdomain should not match', ); assert.equal( patterns.test('https://example.org/not-images/2.jpg'), false, - 'wrong path should not match' + 'wrong path should not match', ); }); @@ -121,19 +121,19 @@ describe( hostname: '*.examp[le.org', pathname: '/images/*', }, - logger + logger, ); assert.strictEqual(regex, undefined); const calls = logger.warn.mock.calls; assert.strictEqual(calls.length, 1); assert.equal( calls[0].arguments[0], - 'Could not generate a valid regex from the remotePattern "{"hostname":"*.examp[le.org","pathname":"/images/*"}". Please check the syntax.' + 'Could not generate a valid regex from the remotePattern "{"hostname":"*.examp[le.org","pathname":"/images/*"}". Please check the syntax.', ); }); }); }, { timeout: 120000, - } + }, ); diff --git a/packages/integrations/netlify/test/functions/redirects.test.js b/packages/integrations/netlify/test/functions/redirects.test.js index ac77056c4..612a46abb 100644 --- a/packages/integrations/netlify/test/functions/redirects.test.js +++ b/packages/integrations/netlify/test/functions/redirects.test.js @@ -34,7 +34,7 @@ describe( it('renders static 404 page', async () => { const entryURL = new URL( './fixtures/redirects/.netlify/v1/functions/ssr/ssr.mjs', - import.meta.url + import.meta.url, ); const { default: handler } = await import(entryURL); const resp = await handler(new Request('http://example.com/nonexistant-page'), {}); @@ -54,7 +54,7 @@ describe( testServer.listen(5678); const entryURL = new URL( './fixtures/redirects/.netlify/v1/functions/ssr/ssr.mjs', - import.meta.url + import.meta.url, ); const { default: handler } = await import(entryURL); const resp = await handler(new Request('http://localhost:5678/nonexistant-page'), {}); @@ -65,5 +65,5 @@ describe( }, { timeout: 120000, - } + }, ); |