Skip to content

Commit

Permalink
Test for hashLength 11ty#103
Browse files Browse the repository at this point in the history
  • Loading branch information
zachleat committed Feb 24, 2022
1 parent 9353fb6 commit d2ea2d0
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -916,3 +916,15 @@ test("Animated gif", async t => {
// it’s a big boi
t.true( stats.gif[0].size > 1000*1000 );
});

test("Change hashLength", async t => {
let stats = await eleventyImage("./test/bio-2017.jpg", {
widths: [null],
hashLength: 6,
formats: ['auto'],
dryRun: true,
});

t.is(stats.jpeg.length, 1);
t.is(stats.jpeg[0].outputPath, path.join("img/KkPMmH-1280.jpeg"));
});

0 comments on commit d2ea2d0

Please sign in to comment.