Skip to content

Commit

Permalink
Windows test
Browse files Browse the repository at this point in the history
  • Loading branch information
zachleat committed Apr 20, 2024
1 parent 562978f commit 3397457
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
"@11ty/eleventy-plugin-webc": "^0.11.2",
"ava": "^6.1.2",
"eslint": "^8.56.0",
"fs-extra": "^11.2.0",
"pixelmatch": "^5.3.0"
},
"ava": {
Expand Down
10 changes: 5 additions & 5 deletions test/test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const path = require("path");
const test = require("ava");
const fs = require("fs");
const fs = require("fs-extra");
const { URL } = require("url");
const eleventyImage = require("../");
const sharp = require("sharp");
Expand Down Expand Up @@ -526,13 +526,13 @@ test("Keep a cache, don’t reuse with same file names and different options", a
});

test("Keep a cache, don’t reuse with if the image changes, check promise equality", async t => {
fs.copyFileSync("./test/modify-bio-original.jpg", "./test/generated-modify-bio.jpg");
fs.copySync("./test/modify-bio-original.jpg", "./test/generated-modify-bio.jpg");

let promise1 = eleventyImage("./test/generated-modify-bio.jpg", {
outputDir: "./test/img/"
});

fs.copyFileSync("./test/modify-bio-grayscale.jpg", "./test/generated-modify-bio.jpg");
fs.copySync("./test/modify-bio-grayscale.jpg", "./test/generated-modify-bio.jpg");

let promise2 = eleventyImage("./test/generated-modify-bio.jpg", {
outputDir: "./test/img/"
Expand All @@ -542,13 +542,13 @@ test("Keep a cache, don’t reuse with if the image changes, check promise equal
});

test("Keep a cache, don’t reuse with if the image changes, check output", async t => {
fs.copyFileSync("./test/modify2-bio-original.jpg", "./test/generated-modify2-bio.jpg");
fs.copySync("./test/modify2-bio-original.jpg", "./test/generated-modify2-bio.jpg");

let stats1 = await eleventyImage("./test/generated-modify2-bio.jpg", {
outputDir: "./test/img/"
});

fs.copyFileSync("./test/modify2-bio-grayscale.jpg", "./test/generated-modify2-bio.jpg");
fs.copySync("./test/modify2-bio-grayscale.jpg", "./test/generated-modify2-bio.jpg");

let stats2 = await eleventyImage("./test/generated-modify2-bio.jpg", {
outputDir: "./test/img/"
Expand Down

0 comments on commit 3397457

Please sign in to comment.