import { makeAppObjectRepo } from "@vived/core";
import { TryShowHoverLabel } from "../UseCases";
import { setupHoverLabel } from "./setupHoverLabel";
describe("Setup Hover Label", () => {
    it("Sets up Try Show UC by default", () => {
        const appObject = makeAppObjectRepo();
        const hoverLabelAO = setupHoverLabel(appObject).appObject;
        expect(hoverLabelAO.hasComponent(TryShowHoverLabel.type)).toBe(true);
    });
    it("Uses the try show factory if it is passed in", () => {
        const appObject = makeAppObjectRepo();
        const tryShowFactory = jest.fn();
        const hoverLabelAO = setupHoverLabel(appObject, {
            tryShowFactory,
        }).appObject;
        expect(tryShowFactory).toHaveBeenCalledWith(hoverLabelAO);
        expect(hoverLabelAO.hasComponent(TryShowHoverLabel.type)).toBe(false); // Proves the default factory was not called
    });
});
//# sourceMappingURL=setupHoverLabel.test.js.map