Add some tests for built css

This commit is contained in:
Pavel Djundik 2019-11-02 12:53:38 +02:00
parent 48713428b7
commit 79e0558b73

View File

@ -34,6 +34,19 @@ describe("public folder", function() {
expect(fs.existsSync(path.join(publicFolder, "css", "style.css.map"))).to.be.true;
});
it("style files contain expected content", function(done) {
fs.readFile(path.join(publicFolder, "css", "style.css"), "utf8", function(err, contents) {
expect(err).to.be.null;
expect(contents.includes("var(--body-color)")).to.be.true;
expect(contents.includes("url(../fonts/fa-solid-900.woff2)")).to.be.true;
expect(contents.includes(".tooltipped{position:relative}")).to.be.true;
expect(contents.includes("sourceMappingURL")).to.be.true;
done();
});
});
it("javascript map is created", function() {
expect(fs.existsSync(path.join(publicFolder, "js", "bundle.js.map"))).to.be.true;
});