summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/parsing.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/parsing.js b/test/parsing.js
index db14d13..2c63a02 100644
--- a/test/parsing.js
+++ b/test/parsing.js
@@ -1,4 +1,5 @@
var path = require('path');
+var _ = require('lodash');
var assert = require('assert');
var Book = require('../').Book;
@@ -29,6 +30,13 @@ describe('Book parsing', function () {
assert.equal(LEXED[1].description, "a second test");
});
+ it('should correctly parse files', function() {
+ var FILES = book1.files;
+
+ assert.equal(FILES.length, 4);
+ assert.equal(_.difference(FILES, [ 'GLOSSARY.md', 'README.md', 'SUMMARY.md', 'intro.md' ]).length, 0);
+ });
+
it('should correctly parse the languages', function() {
assert.equal(book2.books.length, 2);
assert(book2.isMultilingual());