mirror of
https://github.com/sourcey/spectacle.git
synced 2024-09-11 05:25:36 +03:00
38 lines
854 B
JavaScript
38 lines
854 B
JavaScript
var chai = require("chai");
|
|
var should = chai.should();
|
|
|
|
var preprocessor = require("../app/lib/preprocessor");
|
|
|
|
var minimal = require("./minimal").minimal;
|
|
|
|
describe("preprocessor", function() {
|
|
|
|
var spec = null;
|
|
var processed = null;
|
|
|
|
beforeEach(function() {
|
|
spec = Object.assign({}, minimal);
|
|
processed = preprocessor({
|
|
specFile: __dirname + "/spec.json"
|
|
}, spec);
|
|
});
|
|
|
|
describe("with minimal spec", function() {
|
|
|
|
it("should retain initial values", function() {
|
|
Object.assign({}, processed, minimal).should.deep.equal(processed);
|
|
});
|
|
|
|
it("should add 'tags'", function() {
|
|
processed.should.have.property("tags");
|
|
processed.tags.should.deep.equal([]);
|
|
});
|
|
|
|
it("should add 'showTagSummary'", function() {
|
|
processed.should.have.property("showTagSummary", false);
|
|
});
|
|
|
|
});
|
|
|
|
});
|