Skip to content

Commit

Permalink
permalink: false test for #3399
Browse files Browse the repository at this point in the history
  • Loading branch information
zachleat committed Sep 17, 2024
1 parent d480aa4 commit fef236a
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion test/EleventyTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -1556,7 +1556,6 @@ This is usually but not *always* an error so if you’d like to disable this err

test("Truthy outputPath without a file extension error message is disabled, issue #3399", async (t) => {
let elev = new Eleventy("./test/stubs-virtual/", undefined, {
quietMode: true,
config: function (eleventyConfig) {
eleventyConfig.configureErrorReporting({ allowMissingExtensions: true });
eleventyConfig.addTemplate("index.html", "", { permalink: "foo" })
Expand All @@ -1568,3 +1567,15 @@ test("Truthy outputPath without a file extension error message is disabled, issu
t.is(results.length, 1);
});

test("permalink: false outputPath new error message won’t throw an error, issue #3399", async (t) => {
let elev = new Eleventy("./test/stubs-virtual/", undefined, {
config: function (eleventyConfig) {
eleventyConfig.addTemplate("index.html", "", { permalink: false })
},
});
elev.disableLogger();

let results = await elev.toJSON();
t.is(results.length, 1);
});

0 comments on commit fef236a

Please sign in to comment.