import { makeAppObjectRepo } from "@vived/core";
import { makeBabylonEntity } from "../Entities/BabylonEntity";
import { ShowBabylonInspectorPM } from "./ShowBabylonInspectorPM";
function makeTestRig() {
    const appObjects = makeAppObjectRepo();
    const appObj = appObjects.getOrCreate("appObj");
    const babylon = makeBabylonEntity(appObj);
    const pm = new 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