summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test/glossary.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/glossary.js b/test/glossary.js
new file mode 100644
index 0000000..c60fa45
--- /dev/null
+++ b/test/glossary.js
@@ -0,0 +1,14 @@
+var fs = require('fs');
+var path = require('path');
+var assert = require('assert');
+
+var glossary = require('../').parse.glossary;
+
+var CONTENT = fs.readFileSync(path.join(__dirname, './fixtures/GLOSSARY.md'), 'utf8');
+var LEXED = glossary(CONTENT);
+
+describe('Glossary parsing', function () {
+ it('should only get heading + paragraph pairs', function() {
+ assert.equal(LEXED.length, 5);
+ });
+});