diff options
author | Aaron O'Mullan <aaron.omullan@friendco.de> | 2014-08-11 19:41:06 -0700 |
---|---|---|
committer | Aaron O'Mullan <aaron.omullan@friendco.de> | 2014-08-11 19:41:06 -0700 |
commit | e0aed828e0e2be6df601c41649195f6fc71553c9 (patch) | |
tree | b0b8baa7f6053cd36224a72122a42924001941d9 /test/glossary.js | |
parent | 323facbdc8beea33179c7167e4ab4e8d7fe3eb98 (diff) | |
download | gitbook-e0aed828e0e2be6df601c41649195f6fc71553c9.zip gitbook-e0aed828e0e2be6df601c41649195f6fc71553c9.tar.gz gitbook-e0aed828e0e2be6df601c41649195f6fc71553c9.tar.bz2 |
Add very basic glossary parsing test
Diffstat (limited to 'test/glossary.js')
-rw-r--r-- | test/glossary.js | 14 |
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); + }); +}); |