diff options
Diffstat (limited to 'packages/integrations/image/test/image-ssg.test.js')
-rw-r--r-- | packages/integrations/image/test/image-ssg.test.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/packages/integrations/image/test/image-ssg.test.js b/packages/integrations/image/test/image-ssg.test.js index b0d12908c..3c5d4802e 100644 --- a/packages/integrations/image/test/image-ssg.test.js +++ b/packages/integrations/image/test/image-ssg.test.js @@ -58,16 +58,20 @@ describe('SSG images', function () { }); describe('Remote images', () => { + // Hard-coding in the test! This should never change since the hash is based + // on the static `src` string + const HASH = 'Z1iI4xW'; + it('includes src, width, and height attributes', () => { const image = $('#google'); - expect(image.attr('src')).to.equal('/_image/googlelogo_color_272x92dp_544x184.webp'); + expect(image.attr('src')).to.equal(`/_image/googlelogo_color_272x92dp-${HASH}_544x184.webp`); expect(image.attr('width')).to.equal('544'); expect(image.attr('height')).to.equal('184'); }); it('built the optimized image', () => { - verifyImage('_image/googlelogo_color_272x92dp_544x184.webp', { + verifyImage(`_image/googlelogo_color_272x92dp-${HASH}_544x184.webp`, { width: 544, height: 184, type: 'webp', |