"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var chai_1 = require("chai");
var _1 = require(".");
var common_1 = require("../common");
var DIR = common_1.fsPath.resolve('./test/sample');
describe('Settings', function () {
    describe('create', function () {
        it('creates from directory path', function () {
            var settings = _1.Settings.create(DIR);
            chai_1.expect(settings.exists).to.eql(true);
            chai_1.expect(settings.package.exists).to.eql(true);
            chai_1.expect(settings.package.name).to.eql('sample');
        });
        it('creates from file path', function () {
            var path = common_1.fsPath.join(DIR, 'uiharness.yml');
            var settings = _1.Settings.create(path);
            chai_1.expect(settings.exists).to.eql(true);
            chai_1.expect(settings.package.name).to.eql('sample');
        });
        it('returns default settings if file does not exist', function () {
            var settings = _1.Settings.create('/NO_EXIST');
            chai_1.expect(settings.exists).to.eql(false);
            chai_1.expect(settings.package.exists).to.eql(false);
            chai_1.expect(settings.init.scripts).to.eql(true);
            chai_1.expect(settings.init.files).to.eql(true);
            chai_1.expect(settings.init.html).to.eql(true);
            chai_1.expect(settings.init.deps).to.eql(true);
        });
    });
    it('has electron settings', function () {
        var test = function (path) {
            var settings = _1.Settings.create(path);
            chai_1.expect(settings.electron).to.be.an.instanceof(_1.ElectronSettings);
        };
        test();
        test(DIR);
        test('/NO_EXIST');
    });
});
//# sourceMappingURL=Settings.TEST.js.map