import { makeAppObjectRepo } from "@vived/core";
import { makeToolRepo } from "../../Tools/Entities/ToolRepository";
import { SerializeHideableObjects } from "../UCs";
import { setupHideable } from "./setupHideable";
function makeTestRig() {
    const appObjects = makeAppObjectRepo();
    const toolRepo = makeToolRepo(appObjects.getOrCreate("Tools"));
    return { appObjects, toolRepo };
}
describe("Setup Hideable", () => {
    it("Sets up the serializer and tool if no options are passed in", () => {
        const { appObjects, toolRepo } = makeTestRig();
        const ao = setupHideable(appObjects);
        expect(ao.hasComponent(SerializeHideableObjects.type)).toEqual(true);
        expect(toolRepo.getTool("HIDE")).not.toBeUndefined();
    });
    it("Does not setup the serializer if the option is set to to true", () => {
        const { appObjects, toolRepo } = makeTestRig();
        const ao = setupHideable(appObjects, { skipSerializer: true });
        expect(ao.hasComponent(SerializeHideableObjects.type)).toEqual(false);
    });
    it("Does not setup the tool if the option is set to to true", () => {
        const { appObjects, toolRepo } = makeTestRig();
        const ao = setupHideable(appObjects, { skipSetupTool: true });
        expect(toolRepo.getTool("HIDE")).toBeUndefined();
    });
});
//# sourceMappingURL=setupHideable.test.js.map