summaryrefslogtreecommitdiff
path: root/packages/integrations/image/test/image-ssg.test.js
diff options
context:
space:
mode:
authorGravatar Matthew Phillips <matthew@skypack.dev> 2022-07-07 13:49:46 -0400
committerGravatar GitHub <noreply@github.com> 2022-07-07 13:49:46 -0400
commit502f0631317fe1b23582d4126c44f44cb0b0716f (patch)
tree4572d7cfb9d8e8fb9a284b373694e18b410da4b2 /packages/integrations/image/test/image-ssg.test.js
parent568960f17588651974bcba117b1ba45c27b5c760 (diff)
downloadastro-502f0631317fe1b23582d4126c44f44cb0b0716f.tar.gz
astro-502f0631317fe1b23582d4126c44f44cb0b0716f.tar.zst
astro-502f0631317fe1b23582d4126c44f44cb0b0716f.zip
Allow importing Image component from @astrojs/image (#3848)
* Allow importing Image component from @astrojs/image * Adds a changeset * Export the Image type
Diffstat (limited to '')
-rw-r--r--packages/integrations/image/test/image-ssg.test.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/packages/integrations/image/test/image-ssg.test.js b/packages/integrations/image/test/image-ssg.test.js
index 254a3bfae..7df097d41 100644
--- a/packages/integrations/image/test/image-ssg.test.js
+++ b/packages/integrations/image/test/image-ssg.test.js
@@ -2,6 +2,7 @@ import { expect } from 'chai';
import * as cheerio from 'cheerio';
import path from 'path';
import sizeOf from 'image-size';
+import { fileURLToPath } from 'url';
import { loadFixture } from './test-utils.js';
let fixture;
@@ -12,7 +13,8 @@ describe('SSG images', function () {
});
function verifyImage(pathname, expected) {
- const dist = path.join('test/fixtures/basic-image/dist', pathname);
+ const url = new URL('./fixtures/basic-image/dist/' + pathname, import.meta.url);
+ const dist = fileURLToPath(url);
const result = sizeOf(dist);
expect(result).to.deep.equal(expected);
}