summaryrefslogtreecommitdiffstats
path: root/test/glossary.js
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2015-05-28 15:21:03 +0200
committerSamy Pessé <samypesse@gmail.com>2015-05-28 15:21:03 +0200
commit946883fd4c7aebe625868df3d90728f6d69607ce (patch)
tree5c972e11da8d86c2389452c6e41c0b838de7ecce /test/glossary.js
parentb1b7e3148b132abf8fe79bf1f7021370f0822f55 (diff)
parent32203f643825c12e7869006896b03f08cfaa43cc (diff)
downloadgitbook-946883fd4c7aebe625868df3d90728f6d69607ce.zip
gitbook-946883fd4c7aebe625868df3d90728f6d69607ce.tar.gz
gitbook-946883fd4c7aebe625868df3d90728f6d69607ce.tar.bz2
Merge pull request #772 from GitbookIO/feature/glossary_order
Fix #768: sort glossary, start with longest matchs
Diffstat (limited to 'test/glossary.js')
-rw-r--r--test/glossary.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/test/glossary.js b/test/glossary.js
index 631967e..fb573d9 100644
--- a/test/glossary.js
+++ b/test/glossary.js
@@ -14,7 +14,7 @@ describe('Glossary', function () {
it('should correctly list items', function() {
book.should.have.property("glossary");
- book.glossary.should.have.lengthOf(2);
+ book.glossary.should.have.lengthOf(3);
});
});
@@ -73,6 +73,15 @@ describe('Glossary', function () {
}
});
});
+
+ it('should correctly select the longest term', function() {
+ readme.should.be.html({
+ ".page-inner a[href='GLOSSARY.html#test_long']": {
+ count: 1,
+ text: "test long"
+ }
+ });
+ });
});
});
});