2017-10-03 10:52:31 +00:00
|
|
|
"use strict";
|
|
|
|
|
|
|
|
const expect = require("chai").expect;
|
|
|
|
const fs = require("fs");
|
|
|
|
const path = require("path");
|
|
|
|
|
|
|
|
describe("public folder", function() {
|
|
|
|
const publicFolder = path.join(__dirname, "..", "..", "public");
|
|
|
|
|
|
|
|
it("font awesome files are copied", function() {
|
2017-12-08 04:01:58 +00:00
|
|
|
expect(fs.existsSync(path.join(publicFolder, "fonts", "fa-solid-900.woff"))).to.be.true;
|
|
|
|
expect(fs.existsSync(path.join(publicFolder, "fonts", "fa-solid-900.woff2"))).to.be.true;
|
2017-10-03 10:52:31 +00:00
|
|
|
});
|
|
|
|
|
2018-01-14 00:46:59 +00:00
|
|
|
it("index HTML file is not copied", function() {
|
|
|
|
expect(fs.existsSync(path.join(publicFolder, "index.html"))).to.be.false;
|
|
|
|
expect(fs.existsSync(path.join(publicFolder, "index.html.tpl"))).to.be.false;
|
2017-10-03 10:52:31 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
it("javascript files are built", function() {
|
|
|
|
expect(fs.existsSync(path.join(publicFolder, "js", "bundle.js"))).to.be.true;
|
|
|
|
expect(fs.existsSync(path.join(publicFolder, "js", "bundle.vendor.js"))).to.be.true;
|
|
|
|
});
|
|
|
|
|
|
|
|
it("javascript map is created", function() {
|
|
|
|
expect(fs.existsSync(path.join(publicFolder, "js", "bundle.js.map"))).to.be.true;
|
|
|
|
});
|
|
|
|
|
2017-12-16 23:18:43 +00:00
|
|
|
it("loading-error-handlers.js is copied", function() {
|
|
|
|
expect(fs.existsSync(path.join(publicFolder, "js", "loading-error-handlers.js"))).to.be.true;
|
2017-10-03 10:52:31 +00:00
|
|
|
});
|
|
|
|
});
|