summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2015-01-19 12:05:39 +0100
committerSamy Pessé <samypesse@gmail.com>2016-12-22 15:00:29 +0100
commitb79f27cee7e601966caf1cef73b3b6222cb69fa0 (patch)
treecacd6a691d1b89733403273ecb70c59a7f32e6a2
parentd6a9cc1417a35d6315366ee5b2da993ffc64f06c (diff)
downloadgitbook-b79f27cee7e601966caf1cef73b3b6222cb69fa0.zip
gitbook-b79f27cee7e601966caf1cef73b3b6222cb69fa0.tar.gz
gitbook-b79f27cee7e601966caf1cef73b3b6222cb69fa0.tar.bz2
Improve tests for langs parsing
-rw-r--r--packages/gitbook-markdown/test/fixtures/LANGS.md4
-rw-r--r--packages/gitbook-markdown/test/langs.js6
2 files changed, 6 insertions, 4 deletions
diff --git a/packages/gitbook-markdown/test/fixtures/LANGS.md b/packages/gitbook-markdown/test/fixtures/LANGS.md
index eb8b532..a501d22 100644
--- a/packages/gitbook-markdown/test/fixtures/LANGS.md
+++ b/packages/gitbook-markdown/test/fixtures/LANGS.md
@@ -1,4 +1,4 @@
# Languages
-* [English](en)
-* [French](fr)
+* [English](en/)
+* [French](fr/)
diff --git a/packages/gitbook-markdown/test/langs.js b/packages/gitbook-markdown/test/langs.js
index 3a1f082..f5f9bbf 100644
--- a/packages/gitbook-markdown/test/langs.js
+++ b/packages/gitbook-markdown/test/langs.js
@@ -9,10 +9,12 @@ var LEXED = langs(CONTENT);
describe('Languages parsing', function () {
it('should detect paths and titles', function() {
- assert.equal(LEXED.list[0].path,'en');
+ assert.equal(LEXED.list[0].path,'en/');
+ assert.equal(LEXED.list[0].lang,'en');
assert.equal(LEXED.list[0].title,'English');
- assert.equal(LEXED.list[1].path,'fr');
+ assert.equal(LEXED.list[1].path,'fr/');
+ assert.equal(LEXED.list[1].lang,'fr');
assert.equal(LEXED.list[1].title,'French');
});
});