mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-20 17:43:24 +00:00
Add test for #768
This commit is contained in:
@@ -7,3 +7,7 @@ Just a simple and easy to understand test.
|
||||
## hakunamatata
|
||||
|
||||
This word is not present in the content.
|
||||
|
||||
## test long
|
||||
|
||||
This is a test with a longer text that the first entry to test order.
|
||||
|
||||
@@ -6,3 +6,5 @@ The word test should be replaced by a glossary link.
|
||||
But the word test should not be replaced in code blocks
|
||||
```
|
||||
|
||||
The two words test long should be replaced by the correct glossary links.
|
||||
|
||||
|
||||
+10
-1
@@ -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"
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user