import { makeAppObjectRepo } from "@vived/core";
import { makeTryChallengeAgainUcMock } from "../Mocks/TryChallengeAgainUcMock";
import { clickTryChallengeAgain } from "./clickTryChallengeAgain";
function makeTestRig() {
    const appObjects = makeAppObjectRepo();
    const mockUC = makeTryChallengeAgainUcMock(appObjects);
    return { appObjects, mockUC };
}
describe("Click Try Challenge Again", () => {
    it("Calls the UC", () => {
        const { appObjects, mockUC } = makeTestRig();
        clickTryChallengeAgain(appObjects);
        expect(mockUC.tryChallengeAgain).toHaveBeenCalledWith();
    });
    it("Warns if there is no UC", () => {
        const { appObjects, mockUC } = makeTestRig();
        mockUC.dispose();
        appObjects.submitWarning = jest.fn();
        clickTryChallengeAgain(appObjects);
        expect(appObjects.submitWarning).toHaveBeenCalled();
    });
});
//# sourceMappingURL=clickTryChallengeAgain.test.js.map