Skip to content

Commit

Permalink
Write failing test for 11ty#1947
Browse files Browse the repository at this point in the history
  • Loading branch information
AleksandrHovhannisyan committed Nov 20, 2021
1 parent f3831c3 commit 03ed136
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/TemplateFileSlugTest.js
Expand Up @@ -96,6 +96,12 @@ test("Easy slug with date, index with dir", (t) => {
t.is(fs.getFullPathWithoutExtension(), "/test/index");
});

test("Strips date from dir name", (t) => {
let fs = getNewSlugInstance("./2021-11-20-my-awesome-post/index.md");
t.is(fs.getSlug(), "my-awesome-post");
t.is(fs.getFullPathWithoutExtension(), "/2021-11-20-my-awesome-post/index");
});

/* Pass Input dir */
test("Easy slug, input dir", (t) => {
let fs = getNewSlugInstance("./file.html", ".");
Expand Down

0 comments on commit 03ed136

Please sign in to comment.