Skip to content

Commit

Permalink
Use rimraf to remove test files
Browse files Browse the repository at this point in the history
  • Loading branch information
zachleat committed Dec 16, 2023
1 parent 224d79f commit 94a89ff
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 4 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ api-docs/

# Ignore eleventy output when doing manual tests
_site/
!test/stubs-1206/_site

package-lock.json

Expand Down
3 changes: 3 additions & 0 deletions test/EleventyTest.js
Original file line number Diff line number Diff line change
@@ -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";
Expand Down Expand Up @@ -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/");
});
4 changes: 3 additions & 1 deletion test/TemplatePassthroughManagerTest.js
Original file line number Diff line number Diff line change
@@ -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";
Expand Down Expand Up @@ -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/");
});
1 change: 0 additions & 1 deletion test/stubs-1206/_site/page1/index.html

This file was deleted.

1 change: 0 additions & 1 deletion test/stubs-1206/_site/page2/index.html

This file was deleted.

0 comments on commit 94a89ff

Please sign in to comment.