summaryrefslogtreecommitdiffstats
path: root/packages/gitbook-html/test/langs.js
diff options
context:
space:
mode:
Diffstat (limited to 'packages/gitbook-html/test/langs.js')
-rwxr-xr-xpackages/gitbook-html/test/langs.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/packages/gitbook-html/test/langs.js b/packages/gitbook-html/test/langs.js
index c51cf2d..6b5e00b 100755
--- a/packages/gitbook-html/test/langs.js
+++ b/packages/gitbook-html/test/langs.js
@@ -4,10 +4,14 @@ var assert = require('assert');
var langs = require('../').langs;
-var CONTENT = fs.readFileSync(path.join(__dirname, './fixtures/LANGS.html'), 'utf8');
-var LEXED = langs(CONTENT);
-
describe('Languages parsing', function () {
+ var LEXED;
+
+ before(function() {
+ var CONTENT = fs.readFileSync(path.join(__dirname, './fixtures/LANGS.html'), 'utf8');
+ LEXED = langs(CONTENT);
+ });
+
it('should detect paths and titles', function() {
assert.equal(LEXED[0].path,'en/');
assert.equal(LEXED[0].title,'English');