blob: 7efcec144ca08b990ee03f33fb06c3ddbf0ae439 (
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 path = require('path');
var _ = require('lodash');
var assert = require('assert');
var fs = require("fs");
var fsUtil = require("../lib/utils/fs");
describe('Website Generator', function () {
it('should correctly generate a book to website', function(done) {
testGeneration(books[1], "site", function(output) {
assert(fs.existsSync(path.join(output, "index.html")));
}, done);
});
it('should correctly include styles in website', function(done) {
testGeneration(books[0], "site", function(output) {
assert(fs.existsSync(path.join(output, "styles/website.css")));
var INDEX = fs.readFileSync(path.join(output, "index.html")).toString();
assert(INDEX.indexOf("styles/website.css") > 0);
}, done);
});
});
|