blob: 957972577b44b683e2f7bc6222a5191a2543915c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
var fs = require('fs');
var path = require('path');
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);
});
it('should gen content for normal sections', function() {
assert(LEXED[0].content);
});
});
|