summaryrefslogtreecommitdiffstats
path: root/test/conrefs.js
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2015-09-15 12:27:07 +0200
committerSamy Pessé <samypesse@gmail.com>2015-09-15 12:27:07 +0200
commit57a0c3bad8333d93815257d7ff603bc34b8b3f4d (patch)
treecf5f447e84e3b4ac2d74d7092d8c522bd6e67b79 /test/conrefs.js
parent463a947df1e5c8c862c555a5b0ae675e356a0d5c (diff)
parent2a52326a454a23444bd8f0395a9ab8a1f5f68831 (diff)
downloadgitbook-57a0c3bad8333d93815257d7ff603bc34b8b3f4d.zip
gitbook-57a0c3bad8333d93815257d7ff603bc34b8b3f4d.tar.gz
gitbook-57a0c3bad8333d93815257d7ff603bc34b8b3f4d.tar.bz2
Merge pull request #929 from GitbookIO/feature/improve_resolve
Improve paths resolving for conrefs
Diffstat (limited to 'test/conrefs.js')
-rw-r--r--test/conrefs.js31
1 files changed, 28 insertions, 3 deletions
diff --git a/test/conrefs.js b/test/conrefs.js
index 8d6a181..7e044f5 100644
--- a/test/conrefs.js
+++ b/test/conrefs.js
@@ -26,15 +26,40 @@ describe('ConRefs', function () {
});
});
- it('should handle git references', function() {
+ it('should handle local references with absolute paths', function() {
readme.should.be.html({
".page-inner p#t2": {
count: 1,
- text: "Hello from git",
+ text: "Hello World",
trim: true
- },
+ }
+ });
+ });
+
+ it('should correctly include file from git reference', function() {
+ readme.should.be.html({
".page-inner p#t3": {
count: 1,
+ text: "Hello from git",
+ trim: true
+ }
+ });
+ });
+
+ it('should correctly handle deep include in git reference', function() {
+ readme.should.be.html({
+ ".page-inner p#t4": {
+ count: 1,
+ text: "First Hello. Hello from git",
+ trim: true
+ }
+ });
+ });
+
+ it('should correctly handle absolute include in git reference', function() {
+ readme.should.be.html({
+ ".page-inner p#t5": {
+ count: 1,
text: "First Hello. Hello from git",
trim: true
}