shaman-website-compiler
Version:
Compile raw HTML, CSS and Javascript into the smallest possible, SEO friendly website.
28 lines • 1.1 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
require("mocha");
var sinon = require("sinon");
var chai_1 = require("chai");
var app_composition_1 = require("../composition/app.composition");
var models_1 = require("../models");
var glob_service_1 = require("./glob.service");
describe('GlobService', function () {
var sandbox;
beforeEach(function () {
app_composition_1.IoC.snapshot();
sandbox = sinon.createSandbox();
app_composition_1.IoC.bind(app_composition_1.TYPES.WebsiteConfig).toConstantValue(new models_1.WebsiteConfig());
});
afterEach(function () {
app_composition_1.IoC.restore();
sandbox.restore();
});
it('GetFilesFromGlob should return files', function () {
var subject = new glob_service_1.GlobService();
sandbox.stub(subject, 'fastGlob').returns(Promise.resolve(['a.html', 'b.html']));
subject.GetFilesFromGlob([]).then(function (rslt) {
(0, chai_1.expect)(rslt.length).to.equal(2);
});
});
});
//# sourceMappingURL=glob.service.spec.js.map