"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const core_1 = require("@vived/core");
const BabylonEntity_1 = require("../Entities/BabylonEntity");
const ShowBabylonInspectorPM_1 = require("./ShowBabylonInspectorPM");
function makeTestRig() {
    const appObjects = (0, core_1.makeAppObjectRepo)();
    const appObj = appObjects.getOrCreate("appObj");
    const babylon = (0, BabylonEntity_1.makeBabylonEntity)(appObj);
    const pm = new ShowBabylonInspectorPM_1.ShowBabylonInspectorPM(appObj);
    const view = jest.fn();
    pm.addView(view);
    return { babylon, pm, view };
}
describe("Babylon Inspector Presentation Manager", () => {
    it("Initializes correct;y", () => {
        const { pm } = makeTestRig();
        expect(pm.lastVM).toEqual(false);
    });
    it("Updates the view", () => {
        const { view, babylon } = makeTestRig();
        view.mockClear();
        babylon.showInspector = true;
        expect(view).toHaveBeenCalledWith(true);
    });
    it("Compares VM", () => {
        const { pm } = makeTestRig();
        expect(pm.vmsAreEqual(true, true)).toEqual(true);
        expect(pm.vmsAreEqual(false, false)).toEqual(true);
        expect(pm.vmsAreEqual(true, false)).toEqual(false);
        expect(pm.vmsAreEqual(true, false)).toEqual(false);
    });
});
//# sourceMappingURL=ShowBabylonInspectorPM.test.js.map