summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/fixtures/test3/README.adoc4
-rw-r--r--test/fixtures/test3/SUMMARY.adoc5
-rw-r--r--test/fixtures/test3/test.adoc0
-rw-r--r--test/fixtures/test3/test1.adoc0
-rw-r--r--test/fixtures/test3/test3.adoc0
-rw-r--r--test/helper.js6
-rw-r--r--test/parsing.js5
7 files changed, 19 insertions, 1 deletions
diff --git a/test/fixtures/test3/README.adoc b/test/fixtures/test3/README.adoc
new file mode 100644
index 0000000..ea295ee
--- /dev/null
+++ b/test/fixtures/test3/README.adoc
@@ -0,0 +1,4 @@
+= My Book
+
+Test description
+
diff --git a/test/fixtures/test3/SUMMARY.adoc b/test/fixtures/test3/SUMMARY.adoc
new file mode 100644
index 0000000..29fcb65
--- /dev/null
+++ b/test/fixtures/test3/SUMMARY.adoc
@@ -0,0 +1,5 @@
+= Summary
+
+. link:test.adoc[Chapter 1]
+.. link:test1.adoc[Article 1]
+. link:test2.adoc[Chapter 2]
diff --git a/test/fixtures/test3/test.adoc b/test/fixtures/test3/test.adoc
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/fixtures/test3/test.adoc
diff --git a/test/fixtures/test3/test1.adoc b/test/fixtures/test3/test1.adoc
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/fixtures/test3/test1.adoc
diff --git a/test/fixtures/test3/test3.adoc b/test/fixtures/test3/test3.adoc
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/fixtures/test3/test3.adoc
diff --git a/test/helper.js b/test/helper.js
index 74f461a..f29b3c7 100644
--- a/test/helper.js
+++ b/test/helper.js
@@ -15,12 +15,16 @@ global.qdone = function qdone(promise, done) {
before(function(done) {
global.book1 = new Book(path.join(__dirname, './fixtures/test1'));
global.book2 = new Book(path.join(__dirname, './fixtures/test2'));
+ global.book3 = new Book(path.join(__dirname, './fixtures/test3'));
qdone(
global.book1.parse()
.then(function() {
return global.book2.parse();
- }),
+ })
+ .then(function() {
+ return global.book3.parse();
+ }),
done
);
});
diff --git a/test/parsing.js b/test/parsing.js
index 4e76d2c..7be50cd 100644
--- a/test/parsing.js
+++ b/test/parsing.js
@@ -8,6 +8,11 @@ describe('Book parsing', function () {
assert.equal(book1.options.description, 'Test description');
});
+ it('should correctly parse the readme with asciidoc', function() {
+ assert.equal(book3.options.title, 'My Book');
+ assert.equal(book3.options.description, 'Test description');
+ });
+
it('should correctly parse the summary', function() {
var LEXED = book1.summary;