diff options
author | 2024-01-03 14:45:04 +0000 | |
---|---|---|
committer | 2024-01-03 14:45:04 +0000 | |
commit | cf2cfe5090cc50396882afdf6556be45446d8a76 (patch) | |
tree | 487a1cf67c232bac0c762365972bd485eb302934 /packages/integrations/netlify/test/functions/image-cdn.test.js | |
parent | ee994c34a4a9833c48a622c13d51fd54d9f0c7b8 (diff) | |
download | astro-cf2cfe5090cc50396882afdf6556be45446d8a76.tar.gz astro-cf2cfe5090cc50396882afdf6556be45446d8a76.tar.zst astro-cf2cfe5090cc50396882afdf6556be45446d8a76.zip |
[ci] format
Diffstat (limited to 'packages/integrations/netlify/test/functions/image-cdn.test.js')
-rw-r--r-- | packages/integrations/netlify/test/functions/image-cdn.test.js | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/packages/integrations/netlify/test/functions/image-cdn.test.js b/packages/integrations/netlify/test/functions/image-cdn.test.js index 21b5d195e..1737513a4 100644 --- a/packages/integrations/netlify/test/functions/image-cdn.test.js +++ b/packages/integrations/netlify/test/functions/image-cdn.test.js @@ -1,43 +1,43 @@ +import { describe } from 'node:test'; import { loadFixture } from '@astrojs/test-utils'; import { expect } from 'chai'; -import { describe } from 'node:test'; describe('Image CDN', () => { const root = new URL('./fixtures/middleware/', import.meta.url); - describe("when running outside of netlify", () => { - it("does not enable Image CDN", async () => { - const fixture = await loadFixture({ root }); + describe('when running outside of netlify', () => { + it('does not enable Image CDN', async () => { + const fixture = await loadFixture({ root }); await fixture.build(); - const astronautPage = await fixture.readFile('astronaut/index.html'); - expect(astronautPage).contains(`src="/_astro/astronaut.`) - }) - }) + const astronautPage = await fixture.readFile('astronaut/index.html'); + expect(astronautPage).contains(`src="/_astro/astronaut.`); + }); + }); - describe("when running inside of netlify", () => { - it("enables Netlify Image CDN", async () => { - process.env.NETLIFY = 'true' - const fixture = await loadFixture({ root }); + describe('when running inside of netlify', () => { + it('enables Netlify Image CDN', async () => { + process.env.NETLIFY = 'true'; + const fixture = await loadFixture({ root }); await fixture.build(); - const astronautPage = await fixture.readFile('astronaut/index.html'); - expect(astronautPage).contains(`src="/.netlify/image`) + const astronautPage = await fixture.readFile('astronaut/index.html'); + expect(astronautPage).contains(`src="/.netlify/image`); - process.env.NETLIFY = undefined - }) + process.env.NETLIFY = undefined; + }); - it("respects image CDN opt-out", async () => { - process.env.NETLIFY = 'true' - process.env.DISABLE_IMAGE_CDN = 'true' - const fixture = await loadFixture({ root }); + it('respects image CDN opt-out', async () => { + process.env.NETLIFY = 'true'; + process.env.DISABLE_IMAGE_CDN = 'true'; + const fixture = await loadFixture({ root }); await fixture.build(); - const astronautPage = await fixture.readFile('astronaut/index.html'); - expect(astronautPage).contains(`src="/_astro/astronaut.`) + const astronautPage = await fixture.readFile('astronaut/index.html'); + expect(astronautPage).contains(`src="/_astro/astronaut.`); - process.env.NETLIFY = undefined - process.env.DISABLE_IMAGE_CDN = undefined - }) - }) + process.env.NETLIFY = undefined; + process.env.DISABLE_IMAGE_CDN = undefined; + }); + }); }); |