Skip to content

Commit 1853494

Browse files
committed
Added tests.
1 parent edfc428 commit 1853494

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

test/specs/doxdox.js

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
const assert = require('assert');
2+
const fs = require('fs');
3+
4+
const doxdox = require('../../lib/doxdox');
5+
6+
describe('doxdox', () => {
7+
8+
describe('parseInput', () => {
9+
10+
it('parses input from file', done => {
11+
12+
doxdox.parseInput('./lib/doxdox.js', {'parser': 'dox'}).then(() => {
13+
14+
done();
15+
16+
});
17+
18+
});
19+
20+
});
21+
22+
describe('parseInputs', () => {
23+
24+
it('parses multiple input from array', done => {
25+
26+
doxdox.parseInputs(['./lib/doxdox.js'], {
27+
'description': '',
28+
'layout': 'markdown',
29+
'parser': 'dox',
30+
'title': 'Untitled Project'
31+
}).then(content => {
32+
33+
assert.equal(content, fs.readFileSync('./test/fixtures/doxdox.md', 'utf8'));
34+
35+
done();
36+
37+
});
38+
39+
});
40+
41+
});
42+
43+
});

0 commit comments

Comments
 (0)