"use strict";
/**
 * Test case for WindowFeatureFlag
 *
 *  Copyright (C) 2010-2019 R-T Specialty, LLC.
 *
 *  This file is part of the Liza Data Collection Framework
 *
 *  Liza is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
Object.defineProperty(exports, "__esModule", { value: true });
var chai_1 = require("chai");
var WindowFeatureFlag_1 = require("../../../src/system/flags/WindowFeatureFlag");
before(function () {
    this.jsdom = require('jsdom-global')();
});
after(function () {
    this.jsdom();
});
describe('WindowFeatureFlag', function () {
    it('getDomPerfFlag is true when global is set', function () {
        window.dom_perf_flag = true;
        var sut = WindowFeatureFlag_1.WindowFeatureFlag.getInstance();
        chai_1.expect(sut.isEnabled('dom_perf_flag')).to.be.true;
        window.dom_perf_flag = undefined;
    });
    it('getDomPerfFlag is false when global is not defined', function () {
        var sut = WindowFeatureFlag_1.WindowFeatureFlag.getInstance();
        chai_1.expect(sut.isEnabled('dom_perf_flag')).to.be.false;
    });
    it('getDomPerfFlag is false when global is false', function () {
        window.dom_perf_flag = false;
        var sut = WindowFeatureFlag_1.WindowFeatureFlag.getInstance();
        chai_1.expect(sut.isEnabled('dom_perf_flag')).to.be.false;
        window.dom_perf_flag = undefined;
    });
});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiV2luZG93RmVhdHVyZUZsYWdUZXN0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiV2luZG93RmVhdHVyZUZsYWdUZXN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTs7Ozs7Oz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