blob: 7e5ffee4af7d4430ce96acaec8177bc9e9be370e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
var fs = require("fs");
var path = require("path");
var should = require("should");
var Book = require("../").Book;
var LOG_LEVELS = require("../").LOG_LEVELS;
describe("Init Books", function () {
var initRoot;
before(function() {
initRoot = path.resolve(__dirname, "books/init");
return Book.init(initRoot, {
logLevel: LOG_LEVELS.DISABLED,
});
});
it("should create all chapters", function() {
should(fs.existsSync(path.resolve(initRoot, "hello.md"))).be.ok();
should(fs.existsSync(path.resolve(initRoot, "hello2.md"))).be.ok();
should(fs.existsSync(path.resolve(initRoot, "hello3/hello4.md"))).be.ok();
should(fs.existsSync(path.resolve(initRoot, "hello3/hello5/hello6.md"))).be.ok();
});
});
|