summaryrefslogtreecommitdiffstats
path: root/test/glossary.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/glossary.js')
-rw-r--r--test/glossary.js22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/glossary.js b/test/glossary.js
new file mode 100644
index 0000000..442f857
--- /dev/null
+++ b/test/glossary.js
@@ -0,0 +1,22 @@
+var path = require('path');
+var _ = require('lodash');
+var assert = require('assert');
+var cheerio = require('cheerio');
+
+var fs = require("fs");
+var fsUtil = require("../lib/utils/fs");
+
+
+describe('Glossary Generation', function () {
+ it('should correctly replace glossary terms', function(done) {
+ testGeneration(books[0], "website", function(output) {
+ var content = fs.readFileSync(path.join(output, "index.html"), { encoding: "utf8" });
+ var $ = cheerio.load(content);
+
+ var $body = $(".page-inner");
+ var $a = $("a[href='GLOSSARY.html#description']");
+ assert($a.length == 1);
+ assert($a.text() == "description");
+ }, done);
+ });
+});