"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const chai_1 = require("chai");
const src_1 = require("../../src");
const managedTest_1 = require("../managedTest");
describe("Managed tests ", function () {
    it("Should be disabled", () => {
        (0, src_1.disableManaged)();
        (0, chai_1.expect)(src_1.TraceManager.enabled).to.be.false;
        (0, chai_1.expect)((0, src_1.Managed)()(managedTest_1.ManagedTest, "", "")).to.eql(managedTest_1.ManagedTest);
    });
    it("Should be enabled", () => {
        (0, src_1.enableManaged)();
        (0, chai_1.expect)(src_1.TraceManager.enabled).to.be.true;
    });
    it("Should return trace or class", () => {
        const desc = Object.getOwnPropertyDescriptor(managedTest_1.ManagedTest.prototype, "setter");
        (0, chai_1.expect)((0, src_1.Managed)()(managedTest_1.ManagedTest, "setter", desc)).to.eql(desc);
        const desc2 = Object.getOwnPropertyDescriptor(managedTest_1.ManagedTest.prototype, "getter");
        (0, chai_1.expect)((0, src_1.Managed)()(managedTest_1.ManagedTest, "getter", desc2)).to.eql(desc2);
        const desc3 = Object.getOwnPropertyDescriptor(managedTest_1.ManagedTest.prototype, "constructor");
        (0, chai_1.expect)((0, src_1.Managed)()(managedTest_1.ManagedTest, "constructor", desc3)).to.eql(managedTest_1.ManagedTest);
    });
});
//# sourceMappingURL=managed.test.js.map