summaryrefslogtreecommitdiffstats
path: root/test/summary.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/summary.js')
-rw-r--r--test/summary.js25
1 files changed, 25 insertions, 0 deletions
diff --git a/test/summary.js b/test/summary.js
index 99cdf6b..9c6df00 100644
--- a/test/summary.js
+++ b/test/summary.js
@@ -41,5 +41,30 @@ describe('Summary', function () {
book.should.have.file("PAGE1.html");
book.should.have.file("folder/PAGE2.html");
});
+
+ it('should correctly output summary', function() {
+ var PAGE = fs.readFileSync(
+ path.join(book.options.output, "index.html"),
+ { encoding: "utf-8" }
+ );
+
+ PAGE.should.be.html({
+ ".book-summary .chapter[data-level='0'] a": {
+ attributes: {
+ href: "./index.html"
+ }
+ },
+ ".book-summary .chapter[data-level='1'] a": {
+ attributes: {
+ href: "./PAGE1.html"
+ }
+ },
+ ".book-summary .chapter[data-level='2'] a": {
+ attributes: {
+ href: "./folder/PAGE2.html"
+ }
+ }
+ });
+ });
});
});