"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('ElectronSettings', function () {
    it('default values', function () {
        var test = function (path) {
            var res = _1.Settings.create(path).electron;
            chai_1.expect(res.exists).to.eql(false);
            chai_1.expect(res.port).to.eql(8888);
            chai_1.expect(res.entry.main).to.eql('./src/test/app.main.ts');
            chai_1.expect(res.entry.renderer).to.eql('./src/test/app.html');
            var bundler = res.bundlerArgs;
            chai_1.expect(bundler.sourcemaps).to.eql(true);
            chai_1.expect(bundler.treeshake).to.eql(false);
            chai_1.expect(bundler.cmd).to.eql('--no-source-maps');
            var builder = res.builderArgs;
            chai_1.expect(builder.exists).to.eql(false);
        };
        test('/NO_EXIST');
        test(common_1.fsPath.join(DIR, 'empty.yml'));
    });
    it('specified values (from file)', function () {
        var res = _1.Settings.create(DIR).electron;
        chai_1.expect(res.exists).to.eql(true);
        chai_1.expect(res.port).to.eql(1234);
        chai_1.expect(res.entry.main).to.eql('./foo/main/start.ts');
        chai_1.expect(res.entry.renderer).to.eql('./foo/renderer/index.html');
        var bundler = res.bundlerArgs;
        chai_1.expect(bundler.sourcemaps).to.eql(false);
        chai_1.expect(bundler.treeshake).to.eql(true);
        chai_1.expect(bundler.cmd).to.eql('--experimental-scope-hoisting');
        var builder = res.builderArgs;
        chai_1.expect(builder.exists).to.eql(true);
        chai_1.expect(builder.productName).to.eql('MY_APP');
        chai_1.expect(builder.appId).to.eql('com.my-app.app');
        chai_1.expect(builder.outputDir).to.eql('.foo/bar/release');
    });
});
//# sourceMappingURL=ElectronSettings.TEST.js.map