summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--packages/integrations/image/test/image-ssg.test.js54
-rw-r--r--packages/integrations/image/test/image-ssr-build.test.js34
-rw-r--r--packages/integrations/image/test/image-ssr-dev.test.js12
-rw-r--r--packages/integrations/image/test/picture-ssg.test.js162
-rw-r--r--packages/integrations/image/test/picture-ssr-build.test.js24
-rw-r--r--packages/integrations/image/test/picture-ssr-dev.test.js28
-rw-r--r--packages/integrations/image/test/with-mdx.test.js10
7 files changed, 161 insertions, 163 deletions
diff --git a/packages/integrations/image/test/image-ssg.test.js b/packages/integrations/image/test/image-ssg.test.js
index 52daf8f5d..d93f23de8 100644
--- a/packages/integrations/image/test/image-ssg.test.js
+++ b/packages/integrations/image/test/image-ssg.test.js
@@ -25,13 +25,13 @@ describe('SSG images - dev', function () {
title: 'Local images',
id: '#social-jpg',
url: '/@astroimage/assets/social.jpg',
- query: { f: 'jpg', w: '506', h: '253' }
+ query: { f: 'jpg', w: '506', h: '253' },
},
{
title: 'Inline imports',
id: '#inline',
url: '/@astroimage/assets/social.jpg',
- query: { f: 'jpg', w: '506', h: '253' }
+ query: { f: 'jpg', w: '506', h: '253' },
},
{
title: 'Remote images',
@@ -41,15 +41,15 @@ describe('SSG images - dev', function () {
f: 'webp',
w: '544',
h: '184',
- href: 'https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png'
- }
+ href: 'https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png',
+ },
},
{
title: 'Public images',
id: '#hero',
url: '/_image',
- query: { f: 'webp', w: '768', h: '414', href: '/hero.jpg' }
- }
+ query: { f: 'webp', w: '768', h: '414', href: '/hero.jpg' },
+ },
].forEach(({ title, id, url, query }) => {
it(title, () => {
const image = $(id);
@@ -89,13 +89,13 @@ describe('SSG images with subpath - dev', function () {
title: 'Local images',
id: '#social-jpg',
url: '/@astroimage/assets/social.jpg',
- query: { f: 'jpg', w: '506', h: '253' }
+ query: { f: 'jpg', w: '506', h: '253' },
},
{
title: 'Inline imports',
id: '#inline',
url: '/@astroimage/assets/social.jpg',
- query: { f: 'jpg', w: '506', h: '253' }
+ query: { f: 'jpg', w: '506', h: '253' },
},
{
title: 'Remote images',
@@ -105,15 +105,15 @@ describe('SSG images with subpath - dev', function () {
f: 'webp',
w: '544',
h: '184',
- href: 'https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png'
- }
+ href: 'https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png',
+ },
},
{
title: 'Public images',
id: '#hero',
url: '/_image',
- query: { f: 'webp', w: '768', h: '414', href: '/hero.jpg' }
- }
+ query: { f: 'webp', w: '768', h: '414', href: '/hero.jpg' },
+ },
].forEach(({ title, id, url, query }) => {
it(title, () => {
const image = $(id);
@@ -157,26 +157,26 @@ describe('SSG images - build', function () {
title: 'Local images',
id: '#social-jpg',
regex: /^\/social.\w{8}_\w{4,10}.jpg/,
- size: { width: 506, height: 253, type: 'jpg' }
+ size: { width: 506, height: 253, type: 'jpg' },
},
{
title: 'Inline imports',
id: '#inline',
regex: /^\/social.\w{8}_\w{4,10}.jpg/,
- size: { width: 506, height: 253, type: 'jpg' }
+ size: { width: 506, height: 253, type: 'jpg' },
},
{
title: 'Remote images',
id: '#google',
regex: /^\/googlelogo_color_272x92dp_\w{4,10}.webp/,
- size: { width: 544, height: 184, type: 'webp' }
+ size: { width: 544, height: 184, type: 'webp' },
},
{
title: 'Public images',
id: '#hero',
regex: /^\/hero_\w{4,10}.webp/,
- size: { width: 768, height: 414, type: 'webp' }
- }
+ size: { width: 768, height: 414, type: 'webp' },
+ },
].forEach(({ title, id, regex, size }) => {
it(title, () => {
const image = $(id);
@@ -184,10 +184,10 @@ describe('SSG images - build', function () {
expect(image.attr('src')).to.match(regex);
expect(image.attr('width')).to.equal(size.width.toString());
expect(image.attr('height')).to.equal(size.height.toString());
-
+
verifyImage(image.attr('src'), size);
- })
- })
+ });
+ });
});
describe('SSG images with subpath - build', function () {
@@ -215,26 +215,26 @@ describe('SSG images with subpath - build', function () {
title: 'Local images',
id: '#social-jpg',
regex: /^\/docs\/social.\w{8}_\w{4,10}.jpg/,
- size: { width: 506, height: 253, type: 'jpg' }
+ size: { width: 506, height: 253, type: 'jpg' },
},
{
title: 'Inline imports',
id: '#inline',
regex: /^\/docs\/social.\w{8}_\w{4,10}.jpg/,
- size: { width: 506, height: 253, type: 'jpg' }
+ size: { width: 506, height: 253, type: 'jpg' },
},
{
title: 'Remote images',
id: '#google',
regex: /^\/docs\/googlelogo_color_272x92dp_\w{4,10}.webp/,
- size: { width: 544, height: 184, type: 'webp' }
+ size: { width: 544, height: 184, type: 'webp' },
},
{
title: 'Public images',
id: '#hero',
regex: /^\/docs\/hero_\w{4,10}.webp/,
- size: { width: 768, height: 414, type: 'webp' }
- }
+ size: { width: 768, height: 414, type: 'webp' },
+ },
].forEach(({ title, id, regex, size }) => {
it(title, () => {
const image = $(id);
@@ -242,8 +242,8 @@ describe('SSG images with subpath - build', function () {
expect(image.attr('src')).to.match(regex);
expect(image.attr('width')).to.equal(size.width.toString());
expect(image.attr('height')).to.equal(size.height.toString());
-
+
verifyImage(image.attr('src').replace('/docs', ''), size);
- })
+ });
});
});
diff --git a/packages/integrations/image/test/image-ssr-build.test.js b/packages/integrations/image/test/image-ssr-build.test.js
index 333b13f7b..1d45ed234 100644
--- a/packages/integrations/image/test/image-ssr-build.test.js
+++ b/packages/integrations/image/test/image-ssr-build.test.js
@@ -14,19 +14,19 @@ describe('SSR images - build', async function () {
});
await fixture.build();
});
-
+
[
{
title: 'Local images',
id: '#social-jpg',
url: '/_image',
- query: { f: 'jpg', w: '506', h: '253', href: /^\/assets\/social.\w{8}.jpg/ }
+ query: { f: 'jpg', w: '506', h: '253', href: /^\/assets\/social.\w{8}.jpg/ },
},
{
title: 'Inline imports',
id: '#inline',
url: '/_image',
- query: { f: 'jpg', w: '506', h: '253', href: /^\/assets\/social.\w{8}.jpg/ }
+ query: { f: 'jpg', w: '506', h: '253', href: /^\/assets\/social.\w{8}.jpg/ },
},
{
title: 'Remote images',
@@ -36,8 +36,8 @@ describe('SSR images - build', async function () {
f: 'webp',
w: '544',
h: '184',
- href: 'https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png'
- }
+ href: 'https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png',
+ },
},
{
title: 'Remote images with search',
@@ -47,15 +47,15 @@ describe('SSR images - build', async function () {
f: 'webp',
w: '544',
h: '184',
- href: 'https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png?token=abc'
- }
+ href: 'https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png?token=abc',
+ },
},
{
title: 'Public images',
id: '#hero',
url: '/_image',
- query: { f: 'webp', w: '768', h: '414', href: '/hero.jpg' }
- }
+ query: { f: 'webp', w: '768', h: '414', href: '/hero.jpg' },
+ },
].forEach(({ title, id, url, query }) => {
it(title, async () => {
const app = await fixture.loadTestAdapterApp();
@@ -103,13 +103,13 @@ describe('SSR images with subpath - build', function () {
title: 'Local images',
id: '#social-jpg',
url: '/_image',
- query: { f: 'jpg', w: '506', h: '253', href: /^\/docs\/assets\/social.\w{8}.jpg/ }
+ query: { f: 'jpg', w: '506', h: '253', href: /^\/docs\/assets\/social.\w{8}.jpg/ },
},
{
title: 'Inline imports',
id: '#inline',
url: '/_image',
- query: { f: 'jpg', w: '506', h: '253', href: /^\/docs\/assets\/social.\w{8}.jpg/ }
+ query: { f: 'jpg', w: '506', h: '253', href: /^\/docs\/assets\/social.\w{8}.jpg/ },
},
{
title: 'Remote images',
@@ -119,8 +119,8 @@ describe('SSR images with subpath - build', function () {
f: 'webp',
w: '544',
h: '184',
- href: 'https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png'
- }
+ href: 'https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png',
+ },
},
{
title: 'Remote images with search',
@@ -130,15 +130,15 @@ describe('SSR images with subpath - build', function () {
f: 'webp',
w: '544',
h: '184',
- href: 'https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png?token=abc'
- }
+ href: 'https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png?token=abc',
+ },
},
{
title: 'Public images',
id: '#hero',
url: '/_image',
- query: { f: 'webp', w: '768', h: '414', href: '/hero.jpg' }
- }
+ query: { f: 'webp', w: '768', h: '414', href: '/hero.jpg' },
+ },
].forEach(({ title, id, url, query }) => {
it(title, async () => {
const app = await fixture.loadTestAdapterApp();
diff --git a/packages/integrations/image/test/image-ssr-dev.test.js b/packages/integrations/image/test/image-ssr-dev.test.js
index b4d716e72..c34973de9 100644
--- a/packages/integrations/image/test/image-ssr-dev.test.js
+++ b/packages/integrations/image/test/image-ssr-dev.test.js
@@ -47,7 +47,7 @@ describe('SSR images - dev', function () {
f: 'webp',
w: '544',
h: '184',
- href: 'https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png'
+ href: 'https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png',
},
contentType: 'image/webp',
},
@@ -59,10 +59,10 @@ describe('SSR images - dev', function () {
f: 'webp',
w: '768',
h: '414',
- href: '/hero.jpg'
+ href: '/hero.jpg',
},
contentType: 'image/webp',
- }
+ },
].forEach(({ title, id, url, query, contentType }) => {
it(title, async () => {
const image = $(id);
@@ -131,7 +131,7 @@ describe('SSR images with subpath - dev', function () {
f: 'webp',
w: '544',
h: '184',
- href: 'https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png'
+ href: 'https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png',
},
contentType: 'image/webp',
},
@@ -143,10 +143,10 @@ describe('SSR images with subpath - dev', function () {
f: 'webp',
w: '768',
h: '414',
- href: '/hero.jpg'
+ href: '/hero.jpg',
},
contentType: 'image/webp',
- }
+ },
].forEach(({ title, id, url, query, contentType }) => {
it(title, async () => {
const image = $(id);
diff --git a/packages/integrations/image/test/picture-ssg.test.js b/packages/integrations/image/test/picture-ssg.test.js
index 1acb1a1b5..2a7f86c21 100644
--- a/packages/integrations/image/test/picture-ssg.test.js
+++ b/packages/integrations/image/test/picture-ssg.test.js
@@ -28,14 +28,14 @@ describe('SSG pictures - dev', function () {
id: '#social-jpg',
url: '/@astroimage/assets/social.jpg',
query: { f: 'jpg', w: '506', h: '253' },
- alt: 'Social image'
+ alt: 'Social image',
},
{
title: 'Inline imports',
id: '#inline',
url: '/@astroimage/assets/social.jpg',
query: { f: 'jpg', w: '506', h: '253' },
- alt: 'Inline social image'
+ alt: 'Inline social image',
},
{
title: 'Remote images',
@@ -45,16 +45,16 @@ describe('SSG pictures - dev', function () {
f: 'png',
w: '544',
h: '184',
- href: 'https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png'
+ href: 'https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png',
},
- alt: 'Google logo'
+ alt: 'Google logo',
},
{
title: 'Public images',
id: '#hero',
url: '/_image',
query: { f: 'jpg', w: '768', h: '414', href: '/hero.jpg' },
- alt: 'Hero image'
+ alt: 'Hero image',
},
].forEach(({ title, id, url, query, alt }) => {
it(title, () => {
@@ -62,7 +62,7 @@ describe('SSG pictures - dev', function () {
expect(sources.length).to.equal(3);
const image = $(`${id} img`);
-
+
const src = image.attr('src');
const [route, params] = src.split('?');
@@ -101,14 +101,14 @@ describe('SSG pictures with subpath - dev', function () {
id: '#social-jpg',
url: '/@astroimage/assets/social.jpg',
query: { f: 'jpg', w: '506', h: '253' },
- alt: 'Social image'
+ alt: 'Social image',
},
{
title: 'Inline imports',
id: '#inline',
url: '/@astroimage/assets/social.jpg',
query: { f: 'jpg', w: '506', h: '253' },
- alt: 'Inline social image'
+ alt: 'Inline social image',
},
{
title: 'Remote images',
@@ -118,16 +118,16 @@ describe('SSG pictures with subpath - dev', function () {
f: 'png',
w: '544',
h: '184',
- href: 'https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png'
+ href: 'https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png',
},
- alt: 'Google logo'
+ alt: 'Google logo',
},
{
title: 'Public images',
id: '#hero',
url: '/_image',
query: { f: 'jpg', w: '768', h: '414', href: '/hero.jpg' },
- alt: 'Hero image'
+ alt: 'Hero image',
},
].forEach(({ title, id, url, query, alt }) => {
it(title, () => {
@@ -135,7 +135,7 @@ describe('SSG pictures with subpath - dev', function () {
expect(sources.length).to.equal(3);
const image = $(`${id} img`);
-
+
const src = image.attr('src');
const [route, params] = src.split('?');
@@ -184,60 +184,59 @@ describe('SSG pictures - build', function () {
id: '#social-jpg',
regex: /^\/social.\w{8}_\w{4,10}.jpg/,
size: { width: 506, height: 253, type: 'jpg' },
- alt: 'Social image'
+ alt: 'Social image',
},
{
title: 'Inline images',
id: '#inline',
regex: /^\/social.\w{8}_\w{4,10}.jpg/,
size: { width: 506, height: 253, type: 'jpg' },
- alt: 'Inline social image'
+ alt: 'Inline social image',
},
{
title: 'Remote images',
id: '#google',
regex: /^\/googlelogo_color_272x92dp_\w{4,10}.png/,
size: { width: 544, height: 184, type: 'png' },
- alt: 'Google logo'
+ alt: 'Google logo',
},
{
title: 'Public images',
id: '#hero',
regex: /^\/hero_\w{4,10}.jpg/,
size: { width: 768, height: 414, type: 'jpg' },
- alt: 'Hero image'
- }
- ]
- .forEach(({ title, id,regex, size, alt }) => {
- it(title, () => {
- const sources = $(`${id} source`);
- expect(sources.length).to.equal(3);
-
- const image = $(`${id} img`);
-
- expect(image.attr('src')).to.match(regex);
- expect(image.attr('width')).to.equal(size.width.toString());
- expect(image.attr('height')).to.equal(size.height.toString());
- expect(image.attr('alt')).to.equal(alt);
-
- verifyImage(image.attr('src'), size);
-
- sources.each((_, el) => {
- const source = $(el);
- const srcset = source.attr('srcset');
-
- for (const src of srcset.split(',')) {
- const [pathname, width] = src.split(' ');
- const widthNum = parseInt(width.substring(0, width.length - 1));
-
- verifyImage(pathname, {
- width: widthNum,
- height: widthNum === size.width ? size.height : Math.round(size.height / 2),
- type: path.extname(pathname).substring(1)
- })
- }
- })
+ alt: 'Hero image',
+ },
+ ].forEach(({ title, id, regex, size, alt }) => {
+ it(title, () => {
+ const sources = $(`${id} source`);
+ expect(sources.length).to.equal(3);
+
+ const image = $(`${id} img`);
+
+ expect(image.attr('src')).to.match(regex);
+ expect(image.attr('width')).to.equal(size.width.toString());
+ expect(image.attr('height')).to.equal(size.height.toString());
+ expect(image.attr('alt')).to.equal(alt);
+
+ verifyImage(image.attr('src'), size);
+
+ sources.each((_, el) => {
+ const source = $(el);
+ const srcset = source.attr('srcset');
+
+ for (const src of srcset.split(',')) {
+ const [pathname, width] = src.split(' ');
+ const widthNum = parseInt(width.substring(0, width.length - 1));
+
+ verifyImage(pathname, {
+ width: widthNum,
+ height: widthNum === size.width ? size.height : Math.round(size.height / 2),
+ type: path.extname(pathname).substring(1),
+ });
+ }
});
+ });
});
});
@@ -273,59 +272,58 @@ describe('SSG pictures with subpath - build', function () {
id: '#social-jpg',
regex: /^\/docs\/social.\w{8}_\w{4,10}.jpg/,
size: { width: 506, height: 253, type: 'jpg' },
- alt: 'Social image'
+ alt: 'Social image',
},
{
title: 'Inline images',
id: '#inline',
regex: /^\/docs\/social.\w{8}_\w{4,10}.jpg/,
size: { width: 506, height: 253, type: 'jpg' },
- alt: 'Inline social image'
+ alt: 'Inline social image',
},
{
title: 'Remote images',
id: '#google',
regex: /^\/docs\/googlelogo_color_272x92dp_\w{4,10}.png/,
size: { width: 544, height: 184, type: 'png' },
- alt: 'Google logo'
+ alt: 'Google logo',
},
{
title: 'Public images',
id: '#hero',
regex: /^\/docs\/hero_\w{4,10}.jpg/,
size: { width: 768, height: 414, type: 'jpg' },
- alt: 'Hero image'
- }
- ]
- .forEach(({ title, id,regex, size, alt }) => {
- it(title, () => {
- const sources = $(`${id} source`);
- expect(sources.length).to.equal(3);
-
- const image = $(`${id} img`);
-
- expect(image.attr('src')).to.match(regex);
- expect(image.attr('width')).to.equal(size.width.toString());
- expect(image.attr('height')).to.equal(size.height.toString());
- expect(image.attr('alt')).to.equal(alt);
-
- verifyImage(image.attr('src').replace('/docs', ''), size);
-
- sources.each((_, el) => {
- const source = $(el);
- const srcset = source.attr('srcset');
-
- for (const src of srcset.split(',')) {
- const [pathname, width] = src.split(' ');
- const widthNum = parseInt(width.substring(0, width.length - 1))
-
- verifyImage(pathname.replace('/docs', ''), {
- width: widthNum,
- height: widthNum === size.width ? size.height : Math.round(size.height / 2),
- type: path.extname(pathname).substring(1)
- })
- }
- })
+ alt: 'Hero image',
+ },
+ ].forEach(({ title, id, regex, size, alt }) => {
+ it(title, () => {
+ const sources = $(`${id} source`);
+ expect(sources.length).to.equal(3);
+
+ const image = $(`${id} img`);
+
+ expect(image.attr('src')).to.match(regex);
+ expect(image.attr('width')).to.equal(size.width.toString());
+ expect(image.attr('height')).to.equal(size.height.toString());
+ expect(image.attr('alt')).to.equal(alt);
+
+ verifyImage(image.attr('src').replace('/docs', ''), size);
+
+ sources.each((_, el) => {
+ const source = $(el);
+ const srcset = source.attr('srcset');
+
+ for (const src of srcset.split(',')) {
+ const [pathname, width] = src.split(' ');
+ const widthNum = parseInt(width.substring(0, width.length - 1));
+
+ verifyImage(pathname.replace('/docs', ''), {
+ width: widthNum,
+ height: widthNum === size.width ? size.height : Math.round(size.height / 2),
+ type: path.extname(pathname).substring(1),
+ });
+ }
});
+ });
});
});
diff --git a/packages/integrations/image/test/picture-ssr-build.test.js b/packages/integrations/image/test/picture-ssr-build.test.js
index 286037b58..15e884aad 100644
--- a/packages/integrations/image/test/picture-ssr-build.test.js
+++ b/packages/integrations/image/test/picture-ssr-build.test.js
@@ -21,14 +21,14 @@ describe('SSR pictures - build', function () {
id: '#social-jpg',
url: '/_image',
query: { f: 'jpg', w: '506', h: '253', href: /^\/assets\/social.\w{8}.jpg/ },
- alt: 'Social image'
+ alt: 'Social image',
},
{
title: 'Inline imports',
id: '#inline',
url: '/_image',
query: { f: 'jpg', w: '506', h: '253', href: /^\/assets\/social.\w{8}.jpg/ },
- alt: 'Inline social image'
+ alt: 'Inline social image',
},
{
title: 'Remote images',
@@ -38,17 +38,17 @@ describe('SSR pictures - build', function () {
f: 'png',
w: '544',
h: '184',
- href: 'https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png'
+ href: 'https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png',
},
- alt: 'Google logo'
+ alt: 'Google logo',
},
{
title: 'Public images',
id: '#hero',
url: '/_image',
query: { f: 'jpg', w: '768', h: '414', href: '/hero.jpg' },
- alt: 'Hero image'
- }
+ alt: 'Hero image',
+ },
].forEach(({ title, id, url, query }) => {
it(title, async () => {
const app = await fixture.loadTestAdapterApp();
@@ -101,14 +101,14 @@ describe('SSR pictures with subpath - build', function () {
id: '#social-jpg',
url: '/_image',
query: { f: 'jpg', w: '506', h: '253', href: /^\/docs\/assets\/social.\w{8}.jpg/ },
- alt: 'Social image'
+ alt: 'Social image',
},
{
title: 'Inline imports',
id: '#inline',
url: '/_image',
query: { f: 'jpg', w: '506', h: '253', href: /^\/docs\/assets\/social.\w{8}.jpg/ },
- alt: 'Inline social image'
+ alt: 'Inline social image',
},
{
title: 'Remote images',
@@ -118,17 +118,17 @@ describe('SSR pictures with subpath - build', function () {
f: 'png',
w: '544',
h: '184',
- href: 'https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png'
+ href: 'https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png',
},
- alt: 'Google logo'
+ alt: 'Google logo',
},
{
title: 'Public images',
id: '#hero',
url: '/_image',
query: { f: 'jpg', w: '768', h: '414', href: '/hero.jpg' },
- alt: 'Hero image'
- }
+ alt: 'Hero image',
+ },
].forEach(({ title, id, url, query }) => {
it(title, async () => {
const app = await fixture.loadTestAdapterApp();
diff --git a/packages/integrations/image/test/picture-ssr-dev.test.js b/packages/integrations/image/test/picture-ssr-dev.test.js
index 6e0371cd5..ac1d3e638 100644
--- a/packages/integrations/image/test/picture-ssr-dev.test.js
+++ b/packages/integrations/image/test/picture-ssr-dev.test.js
@@ -31,7 +31,7 @@ describe('SSR pictures - dev', function () {
url: '/@astroimage/assets/social.jpg',
query: { f: 'jpg', w: '506', h: '253' },
contentType: 'image/jpeg',
- alt: 'Social image'
+ alt: 'Social image',
},
{
title: 'Inline imports',
@@ -39,7 +39,7 @@ describe('SSR pictures - dev', function () {
url: '/@astroimage/assets/social.jpg',
query: { f: 'jpg', w: '506', h: '253' },
contentType: 'image/jpeg',
- alt: 'Inline social image'
+ alt: 'Inline social image',
},
{
title: 'Remote images',
@@ -49,10 +49,10 @@ describe('SSR pictures - dev', function () {
f: 'png',
w: '544',
h: '184',
- href: 'https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png'
+ href: 'https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png',
},
contentType: 'image/png',
- alt: 'Google logo'
+ alt: 'Google logo',
},
{
title: 'Public images',
@@ -62,11 +62,11 @@ describe('SSR pictures - dev', function () {
f: 'jpg',
w: '768',
h: '414',
- href: '/hero.jpg'
+ href: '/hero.jpg',
},
contentType: 'image/jpeg',
- alt: 'Hero image'
- }
+ alt: 'Hero image',
+ },
].forEach(({ title, id, url, query, alt, contentType }) => {
it(title, async () => {
const sources = $(`${id} source`);
@@ -125,7 +125,7 @@ describe('SSR pictures with subpath - dev', function () {
url: '/@astroimage/assets/social.jpg',
query: { f: 'jpg', w: '506', h: '253' },
contentType: 'image/jpeg',
- alt: 'Social image'
+ alt: 'Social image',
},
{
title: 'Inline imports',
@@ -133,7 +133,7 @@ describe('SSR pictures with subpath - dev', function () {
url: '/@astroimage/assets/social.jpg',
query: { f: 'jpg', w: '506', h: '253' },
contentType: 'image/jpeg',
- alt: 'Inline social image'
+ alt: 'Inline social image',
},
{
title: 'Remote images',
@@ -143,10 +143,10 @@ describe('SSR pictures with subpath - dev', function () {
f: 'png',
w: '544',
h: '184',
- href: 'https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png'
+ href: 'https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png',
},
contentType: 'image/png',
- alt: 'Google logo'
+ alt: 'Google logo',
},
{
title: 'Public images',
@@ -156,11 +156,11 @@ describe('SSR pictures with subpath - dev', function () {
f: 'jpg',
w: '768',
h: '414',
- href: '/hero.jpg'
+ href: '/hero.jpg',
},
contentType: 'image/jpeg',
- alt: 'Hero image'
- }
+ alt: 'Hero image',
+ },
].forEach(({ title, id, url, query, alt, contentType }) => {
it(title, async () => {
const sources = $(`${id} source`);
diff --git a/packages/integrations/image/test/with-mdx.test.js b/packages/integrations/image/test/with-mdx.test.js
index e92bb155e..86fa2918c 100644
--- a/packages/integrations/image/test/with-mdx.test.js
+++ b/packages/integrations/image/test/with-mdx.test.js
@@ -29,26 +29,26 @@ describe('Images in MDX - build', function () {
title: 'Local images',
id: '#social-jpg',
regex: /^\/social.\w{8}_\w{4,10}.jpg/,
- size: { width: 506, height: 253, type: 'jpg' }
+ size: { width: 506, height: 253, type: 'jpg' },
},
{
title: 'Inline imports',
id: '#inline',
regex: /^\/social.\w{8}_\w{4,10}.jpg/,
- size: { width: 506, height: 253, type: 'jpg' }
+ size: { width: 506, height: 253, type: 'jpg' },
},
{
title: 'Remote images',
id: '#google',
regex: /^\/googlelogo_color_272x92dp_\w{4,10}.webp/,
- size: { width: 544, height: 184, type: 'webp' }
+ size: { width: 544, height: 184, type: 'webp' },
},
{
title: 'Public images',
id: '#hero',
regex: /^\/hero_\w{4,10}.webp/,
- size: { width: 768, height: 414, type: 'webp' }
- }
+ size: { width: 768, height: 414, type: 'webp' },
+ },
].forEach(({ title, id, regex, size }) => {
it(title, () => {
const image = $(id);