diff options
Diffstat (limited to 'test/app.test.js')
-rw-r--r-- | test/app.test.js | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/app.test.js b/test/app.test.js index f673247..6810089 100644 --- a/test/app.test.js +++ b/test/app.test.js @@ -39,6 +39,15 @@ test("homepage", t => { "/post/testfile", "first post url" ); + t.is( + $(".post:first-of-type time").text(), + "Sunday, January 1, 2017", + "first post date" + ); + t.is( + $(".post:first-of-type time").attr("datetime"), + new Date("2017-01-01").toISOString() + ); return $; }) .then(toMicroformatsOptions) @@ -84,6 +93,15 @@ test("post", t => { "article header is post title" ); t.is( + $("article time").text(), + "Sunday, January 1, 2017", + "first post date" + ); + t.is( + $("article time").attr("datetime"), + new Date("2017-01-01").toISOString() + ); + t.is( $("article p").text(), `Ut enim blandit volutpat maecenas? Volutpat blandit aliquam etiam erat \ velit, scelerisque in dictum non, consectetur a erat nam at lectus \ @@ -124,6 +142,11 @@ test("tags", t => { "/post/testfile", "post url" ); + t.is( + $(".post:first-of-type time").text(), + "Sunday, January 1, 2017", + "first post date" + ); }); }); |