diff --git a/.gitignore b/.gitignore index 07180cdc2..c7d550f32 100644 --- a/.gitignore +++ b/.gitignore @@ -19,7 +19,6 @@ api-docs/ # Ignore eleventy output when doing manual tests _site/ -!test/stubs-1206/_site package-lock.json diff --git a/test/EleventyTest.js b/test/EleventyTest.js index d0a147e25..044e40d02 100644 --- a/test/EleventyTest.js +++ b/test/EleventyTest.js @@ -1,6 +1,7 @@ import test from "ava"; import fs from "fs"; import lodash from "@11ty/lodash-custom"; +import { rimrafSync } from "rimraf"; import eventBus from "../src/EventBus.js"; import Eleventy from "../src/Eleventy.js"; @@ -791,4 +792,6 @@ test("Access to raw input of file (dryRun), issue #1206", async (t) => { t.deepEqual(results[0].rawInput, `This is the first template.`); t.deepEqual(results[1].content, `This is the second template.This is the first template.`); t.deepEqual(results[1].rawInput, `This is the second template.{{ collections.tag1[0].rawInput }}`); + + rimrafSync("./test/stubs-1206/_site/"); }); diff --git a/test/TemplatePassthroughManagerTest.js b/test/TemplatePassthroughManagerTest.js index 8be7411c5..26a773837 100644 --- a/test/TemplatePassthroughManagerTest.js +++ b/test/TemplatePassthroughManagerTest.js @@ -1,5 +1,6 @@ import test from "ava"; import fs from "fs"; +import { rimrafSync } from "rimraf"; import TemplatePassthroughManager from "../src/TemplatePassthroughManager.js"; import TemplateConfig from "../src/TemplateConfig.js"; @@ -198,5 +199,6 @@ test("Look for uniqueness on template passthrough paths #1677", async (t) => { await mgr.copyAll(); }); - fs.unlinkSync("test/stubs/template-passthrough-duplicates/_site/avatar.png"); + + rimrafSync("test/stubs/template-passthrough-duplicates/_site/"); }); diff --git a/test/stubs-1206/_site/page1/index.html b/test/stubs-1206/_site/page1/index.html deleted file mode 100644 index dc801a5b8..000000000 --- a/test/stubs-1206/_site/page1/index.html +++ /dev/null @@ -1 +0,0 @@ -This is the first template. \ No newline at end of file diff --git a/test/stubs-1206/_site/page2/index.html b/test/stubs-1206/_site/page2/index.html deleted file mode 100644 index a90e51c4f..000000000 --- a/test/stubs-1206/_site/page2/index.html +++ /dev/null @@ -1 +0,0 @@ -This is the second template.This is the first template. \ No newline at end of file