summaryrefslogtreecommitdiffstats
path: root/packages/gitbook-asciidoc/test/page.js
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2016-02-20 15:31:29 +0100
committerSamy Pessé <samypesse@gmail.com>2016-12-22 11:46:22 +0100
commit147679a42257660d70a9ef6ac6216fabf1d67582 (patch)
tree4dfd4a809c8351b9eea4ebfcc222878a30bec0ad /packages/gitbook-asciidoc/test/page.js
parentd7b5c6a14d823cd067c7309240326d18a495674a (diff)
downloadgitbook-147679a42257660d70a9ef6ac6216fabf1d67582.zip
gitbook-147679a42257660d70a9ef6ac6216fabf1d67582.tar.gz
gitbook-147679a42257660d70a9ef6ac6216fabf1d67582.tar.bz2
Use gitbook-html as base parser
Diffstat (limited to 'packages/gitbook-asciidoc/test/page.js')
-rwxr-xr-xpackages/gitbook-asciidoc/test/page.js18
1 files changed, 7 insertions, 11 deletions
diff --git a/packages/gitbook-asciidoc/test/page.js b/packages/gitbook-asciidoc/test/page.js
index 9579725..3a28c5f 100755
--- a/packages/gitbook-asciidoc/test/page.js
+++ b/packages/gitbook-asciidoc/test/page.js
@@ -4,19 +4,15 @@ var assert = require('assert');
var page = require('../').page;
-function loadPage (name, options) {
- var CONTENT = fs.readFileSync(path.join(__dirname, './fixtures/' + name + '.adoc'), 'utf8');
- return page(CONTENT, options).sections;
-}
-
-var LEXED = loadPage('PAGE');
-
describe('Page parsing', function() {
- it('should detect sections', function() {
- assert.equal(LEXED.length, 1);
+ var LEXED;
+
+ before(function() {
+ var CONTENT = fs.readFileSync(path.join(__dirname, './fixtures/PAGE.adoc'), 'utf8');
+ LEXED = page(CONTENT);
});
- it('should gen content for normal sections', function() {
- assert(LEXED[0].content);
+ it('should gen content', function() {
+ assert(LEXED.content);
});
});