문제: useApplicationMutation이 BoundMutation과 함께 raw
LegacyMutationOptions({ execute, definitionId })도 공개 overload로
받는다. raw 쓰기는 intent가 없어 Idempotency-Key 없이 나가고, scope
세대 확인과 측정 profile을 건너뛴다. 결과 불명 뒤 resendUnknownEffect()는
null이라 샘플 폼을 복사하면 "같은 요청으로 다시 보내기"를 눌러도 아무
일이 없고 새 제출도 막힌다. tsc·eslint·depcruise 어느 것도 기능 코드의
raw 사용을 막지 않는다.
고른 방법(결정대로):
- 공개 useApplicationMutation에서 raw overload를 뺀다. 남은 공개
시그니처는 BoundMutation 하나다. 런타임 LEGACY 분기는 그대로 둔다.
- raw로 쓰인 테스트 24곳(3파일)은 tests/helpers/legacy-application-
query-harness.ts의 useLegacyApplicationMutation으로 옮긴다. harness는
명시적 cast로만 그 분기에 닿는다. 단언은 한 줄도 바꾸지 않았다.
- 타입 fixture: application-mutation-admission 테스트에 제품 훅에 raw
입력을 넘기는 @ts-expect-error를 둔다. raw overload가 돌아오면
tsconfig.test.json 검사가 TS2578로 실패한다.
- raw query({ queryKey, execute })는 남긴다. 먼저 확인했다: raw query는
세션이 바뀐 뒤 이전 사용자의 결과를 보이지 않는다. FENCED에서
ServerStateScopeProvider가 하위 트리를 내리고, READY는 이전
QueryClient를 비우고 세대 key로 새 QueryClient를 붙인 뒤에 온다. 늦게
온 이전 응답은 버려진 client에 쓰인다. 이 동작을
server-state-generation-provider 테스트로 고정했고, 생성 저장소가 같은
client를 비우지 않고 다시 쓰게 바꾸면 이 테스트가 실패한다(변이 확인).
시그니처 JSDoc에 "scope·측정 profile 없이 도는 읽기 경로"와 provider
밖에서는 훅이 막지 않는다는 위험을 적었다.
- typescript-state-and-data-flow.md 4.3의 raw 예시를 bound 정의로 바꾼다.
버린 대안: raw query까지 제거 — 다운스트림 memento의 raw query 12곳이
깨지는데 읽기는 다시 보내도 부작용이 없어 얻는 안전이 작다. 현상 유지 —
쓰기 경로의 중복 생성과 동작하지 않는 재전송이 남는다. 런타임 LEGACY
분기 제거 — legacy 전용 테스트 4건의 단언이 바뀌어 "같은 단언 유지"를
못 지킨다. 별도 tests/fixtures/typecheck + CI 명령 — package.json,
gates.json, contract-baseline.json, 명령 수를 고정한 테스트까지 바꾸고
다른 수정과 baseline 해시가 충돌한다. 같은 tsc 검사를 기존
check:types:test 게이트가 돈다.
위험·한계: 공개 계약 변경(BREAKING). 런타임에는 raw 분기가 남아 cast로
여전히 닿는다(타입으로만 막음). LegacyMutationOptions 타입은 harness가
쓰도록 application-query.ts에서 export한다(배럴에는 없음). raw query는
ServerStateGenerationProvider 밖에서 쓰면 세션 보호가 없다.
검증:
- RED: 원래 훅(raw overload 있음)으로 tsc -p tsconfig.test.json →
"error TS2578: Unused '@ts-expect-error' directive."
- GREEN: tsc app·test·node 통과. tests/component 35 files 229 tests
통과(옮긴 테스트 포함). tests/unit·component·features·contract·
runtime-schema·architecture·scripts·integration(security-followup-
archive 제외, pnpm 사용) 256 files 중 3 files 4 tests가 부하(load
avg 32)에서 실패했고 세 파일을 3회 다시 돌려 모두 통과(78/78). eslint
(바꾼 파일) 통과.
- 다운스트림(읽기만): memento 10곳, tech-log 34곳 모두 bound. 깨지는
제품 호출 0곳. 두 repo의 tests/component 템플릿 소유 테스트 3파일은
raw 호출이 있어 harness와 함께 동기화해야 한다.
BREAKING CHANGE: useApplicationMutation이 raw { execute, definitionId }
입력을 받지 않는다. BoundMutation(definitionId, definitionVersion,
operationId, requiresIdempotencyKey, owner, duplicatePolicy, scope,
invalidate, execute(input, { signal, intent }))을 넘긴다. scope는
useServerStateScope()에서 얻는다.
Refs: docs/reviews/2026-11-01-maturity-review/08-presentation.md 08-03
516 lines
17 KiB
TypeScript
516 lines
17 KiB
TypeScript
// @vitest-environment jsdom
|
|
|
|
import { act, renderHook, waitFor } from "@testing-library/react";
|
|
import { describe, expect, it, vi } from "vitest";
|
|
|
|
import {
|
|
type ApplicationResult,
|
|
useApplicationMutation,
|
|
} from "../../src/presentation/adapters/query/application-query.ts";
|
|
import type { MutationIntentFactory } from "../../src/application/ports/mutation-intent-factory.ts";
|
|
import { createFailure } from "../../src/contracts/errors.ts";
|
|
import type { MutationIntent } from "../../src/contracts/mutation-intent.ts";
|
|
import { createRuntimeIdentityRegistry } from "../../src/contracts/query-keys.ts";
|
|
import { MUTATION_COORDINATOR_BOUNDS } from "../../src/contracts/server-state.ts";
|
|
import {
|
|
RESOURCE_INVALIDATION_TOPIC,
|
|
deterministicMutationIntentFactory,
|
|
queryClient,
|
|
scopeSnapshot,
|
|
wrapper,
|
|
} from "./application-query-fixture.tsx";
|
|
import { useLegacyApplicationMutation } from "../helpers/legacy-application-query-harness.ts";
|
|
|
|
describe("application mutation intent admission", () => {
|
|
it("retains optimistic data when execute throws after dispatch begins", async () => {
|
|
const client = queryClient();
|
|
const key = ["resource", "thrown-unknown-effect"];
|
|
client.setQueryData(key, ["base"]);
|
|
const hook = renderHook(
|
|
() =>
|
|
useLegacyApplicationMutation<string, string>({
|
|
execute: async () => {
|
|
throw new Error("private transport defect");
|
|
},
|
|
currentData: client.getQueryData(key),
|
|
optimistic: {
|
|
queryKey: key,
|
|
update: (previous, input) => [
|
|
...(previous as string[]),
|
|
input,
|
|
],
|
|
},
|
|
}),
|
|
{ wrapper: wrapper(client) },
|
|
);
|
|
|
|
let outcome: ApplicationResult<string> | undefined;
|
|
await act(async () => {
|
|
outcome = await hook.result.current.submit("created");
|
|
});
|
|
|
|
expect(outcome).toMatchObject({
|
|
ok: false,
|
|
error: {
|
|
effect: "MAYBE_APPLIED",
|
|
retryable: false,
|
|
action: "contact-support",
|
|
},
|
|
});
|
|
expect(JSON.stringify(outcome)).not.toContain("private transport defect");
|
|
expect(client.getQueryData(key)).toEqual(["base", "created"]);
|
|
expect(hook.result.current.state.indicator).toBe(
|
|
"mutation-effect-unknown",
|
|
);
|
|
});
|
|
|
|
it("creates a distinct logical intent for each independently admitted submit", async () => {
|
|
const client = queryClient();
|
|
const scope = scopeSnapshot();
|
|
const observedIntents: unknown[] = [];
|
|
const execute = vi.fn(
|
|
async (
|
|
input: string,
|
|
context: Readonly<{ signal: AbortSignal; intent?: unknown }>,
|
|
) => {
|
|
observedIntents.push(context.intent);
|
|
return { ok: true as const, value: input };
|
|
},
|
|
);
|
|
const hook = renderHook(
|
|
() =>
|
|
useApplicationMutation<string, string>({
|
|
definitionId: "independent-intent-v1",
|
|
definitionVersion: 1,
|
|
operationId: "CREATE_WITH_INTENT",
|
|
requiresIdempotencyKey: true,
|
|
owner: "platform-test",
|
|
duplicatePolicy: "ALLOW_PARALLEL",
|
|
scope,
|
|
execute,
|
|
invalidate: [],
|
|
}),
|
|
{ wrapper: wrapper(client) },
|
|
);
|
|
|
|
await act(async () => {
|
|
await hook.result.current.submit("same-input");
|
|
await hook.result.current.submit("same-input");
|
|
});
|
|
|
|
expect(observedIntents).toHaveLength(2);
|
|
expect(observedIntents[0]).toMatchObject({
|
|
intentId: "intent-1",
|
|
operationId: "CREATE_WITH_INTENT",
|
|
idempotencyKey: "key-1",
|
|
});
|
|
expect(observedIntents[1]).toMatchObject({
|
|
intentId: "intent-2",
|
|
operationId: "CREATE_WITH_INTENT",
|
|
idempotencyKey: "key-2",
|
|
});
|
|
expect(observedIntents[0]).not.toEqual(observedIntents[1]);
|
|
});
|
|
|
|
it("creates no second intent when JOIN_IDENTICAL shares an admitted submit", async () => {
|
|
const client = queryClient();
|
|
const scope = scopeSnapshot();
|
|
const deterministicFactory = deterministicMutationIntentFactory();
|
|
const createIntent = vi.fn(deterministicFactory.create);
|
|
const factory: MutationIntentFactory = Object.freeze({
|
|
create: createIntent,
|
|
});
|
|
let complete: (value: ApplicationResult<string>) => void = () => {};
|
|
const execute = vi.fn(
|
|
() =>
|
|
new Promise<ApplicationResult<string>>((resolve) => {
|
|
complete = resolve;
|
|
}),
|
|
);
|
|
const hook = renderHook(
|
|
() =>
|
|
useApplicationMutation<string, string>({
|
|
definitionId: "joined-intent-v1",
|
|
definitionVersion: 1,
|
|
operationId: "CREATE_JOINED",
|
|
requiresIdempotencyKey: true,
|
|
owner: "platform-test",
|
|
duplicatePolicy: "JOIN_IDENTICAL",
|
|
scope,
|
|
execute,
|
|
invalidate: [],
|
|
}),
|
|
{ wrapper: wrapper(client, factory) },
|
|
);
|
|
|
|
let first: Promise<ApplicationResult<string>> | null = null;
|
|
let joined: Promise<ApplicationResult<string>> | null = null;
|
|
act(() => {
|
|
first = hook.result.current.submit("same-input");
|
|
joined = hook.result.current.submit("same-input");
|
|
});
|
|
|
|
expect(first).toBe(joined);
|
|
await waitFor(() => expect(execute).toHaveBeenCalledOnce());
|
|
expect(createIntent).toHaveBeenCalledOnce();
|
|
expect(createIntent).toHaveBeenCalledWith({
|
|
operationId: "CREATE_JOINED",
|
|
canonicalInputIdentity:
|
|
"scope-fingerprint-0001:joined-intent-v1:scope-identity-token-0001",
|
|
requiresIdempotencyKey: true,
|
|
});
|
|
|
|
complete({ ok: true, value: "same-input" });
|
|
if (!first) throw new Error("expected admitted mutation");
|
|
await act(() => first);
|
|
});
|
|
|
|
it("bounds JOIN_IDENTICAL waiters without starting another mutation", async () => {
|
|
const client = queryClient();
|
|
const scope = scopeSnapshot();
|
|
let complete: (value: ApplicationResult<string>) => void = () => {};
|
|
const execute = vi.fn(
|
|
() =>
|
|
new Promise<ApplicationResult<string>>((resolve) => {
|
|
complete = resolve;
|
|
}),
|
|
);
|
|
const hook = renderHook(
|
|
() =>
|
|
useApplicationMutation<string, string>({
|
|
definitionId: "joined-waiter-budget-v1",
|
|
definitionVersion: 1,
|
|
operationId: "CREATE_JOINED_BOUNDED",
|
|
requiresIdempotencyKey: true,
|
|
owner: "platform-test",
|
|
duplicatePolicy: "JOIN_IDENTICAL",
|
|
scope,
|
|
execute,
|
|
invalidate: [],
|
|
}),
|
|
{ wrapper: wrapper(client) },
|
|
);
|
|
|
|
let admitted: Promise<ApplicationResult<string>> | null = null;
|
|
let joined: readonly Promise<ApplicationResult<string>>[] = [];
|
|
let overflow: Promise<ApplicationResult<string>> | null = null;
|
|
act(() => {
|
|
admitted = hook.result.current.submit("same-input");
|
|
joined = Array.from(
|
|
{ length: MUTATION_COORDINATOR_BOUNDS.waitersPerJoinedIntent },
|
|
() => hook.result.current.submit("same-input"),
|
|
);
|
|
overflow = hook.result.current.submit("same-input");
|
|
});
|
|
|
|
expect(joined.every((waiter) => waiter === admitted)).toBe(true);
|
|
expect(overflow).not.toBe(admitted);
|
|
if (!overflow) throw new Error("expected overflow result");
|
|
await expect(overflow).resolves.toMatchObject({
|
|
ok: false,
|
|
error: {
|
|
kind: "DUPLICATE_IN_FLIGHT",
|
|
code: "JOIN_WAITER_LIMIT_EXCEEDED",
|
|
effect: "NOT_STARTED",
|
|
},
|
|
});
|
|
await waitFor(() => expect(execute).toHaveBeenCalledOnce());
|
|
|
|
complete({ ok: true, value: "same-input" });
|
|
if (!admitted) throw new Error("expected admitted mutation");
|
|
await act(() => admitted);
|
|
});
|
|
|
|
it("keeps the legacy raw mutation path outside the intent factory", async () => {
|
|
const client = queryClient();
|
|
const createIntent = vi.fn<MutationIntentFactory["create"]>();
|
|
const factory: MutationIntentFactory = Object.freeze({
|
|
create: createIntent,
|
|
});
|
|
const execute = vi.fn(async (input: string) => ({
|
|
ok: true as const,
|
|
value: input,
|
|
}));
|
|
const hook = renderHook(
|
|
() =>
|
|
useLegacyApplicationMutation<string, string>({
|
|
definitionId: "legacy-raw-path-v1",
|
|
execute,
|
|
}),
|
|
{ wrapper: wrapper(client, factory) },
|
|
);
|
|
|
|
await act(() => hook.result.current.submit("legacy-input"));
|
|
|
|
expect(execute).toHaveBeenCalledOnce();
|
|
expect(createIntent).not.toHaveBeenCalled();
|
|
});
|
|
|
|
// 1101/08-03. Type fixture, checked by `tsc -p tsconfig.test.json`: if the
|
|
// product hook takes a raw executor again, the directive below is unused
|
|
// (TS2578) and the type check fails. Only the harness reaches that path.
|
|
it("rejects a raw executor on the product hook at compile time", () => {
|
|
const raw = {
|
|
definitionId: "raw-product-call-v1",
|
|
execute: async (input: string) => ({ ok: true as const, value: input }),
|
|
};
|
|
const useRawProductMutation = () =>
|
|
useApplicationMutation<string, string>(
|
|
// @ts-expect-error a raw executor is not a BoundMutation.
|
|
raw,
|
|
);
|
|
|
|
expect(useRawProductMutation).toBeTypeOf("function");
|
|
});
|
|
|
|
it("rejects a duplicate submit by default while one is active", async () => {
|
|
const client = queryClient();
|
|
let complete: (value: ApplicationResult<string>) => void = () => {};
|
|
const execute = vi.fn(
|
|
() =>
|
|
new Promise<ApplicationResult<string>>((resolve) => {
|
|
complete = resolve;
|
|
}),
|
|
);
|
|
const hook = renderHook(
|
|
() =>
|
|
useLegacyApplicationMutation<string, string>({
|
|
definitionId: "legacy-duplicate-rejection-v1",
|
|
execute,
|
|
}),
|
|
{ wrapper: wrapper(client) },
|
|
);
|
|
|
|
let first: Promise<ApplicationResult<string>> | null = null;
|
|
let duplicate: Promise<ApplicationResult<string>> | null = null;
|
|
act(() => {
|
|
first = hook.result.current.submit("created");
|
|
duplicate = hook.result.current.submit("created");
|
|
});
|
|
|
|
if (!first || !duplicate) throw new Error("expected two submissions");
|
|
await expect(duplicate).resolves.toMatchObject({
|
|
ok: false,
|
|
error: { kind: "DUPLICATE_IN_FLIGHT" },
|
|
});
|
|
expect(execute).toHaveBeenCalledOnce();
|
|
|
|
complete({ ok: true, value: "created" });
|
|
await act(() => first as Promise<ApplicationResult<string>>);
|
|
});
|
|
|
|
it("deduplicates submit and commits one optimistic mutation", async () => {
|
|
const client = queryClient();
|
|
const key = ["resource", "list"];
|
|
client.setQueryData(key, ["existing"]);
|
|
let complete: (value: ApplicationResult<string>) => void = () => {};
|
|
const execute = vi.fn(
|
|
() =>
|
|
new Promise<ApplicationResult<string>>((resolve) => {
|
|
complete = resolve;
|
|
}),
|
|
);
|
|
const hook = renderHook(
|
|
() =>
|
|
useLegacyApplicationMutation<string, string>({
|
|
// §11.2: joining is opt-in. The default is REJECT_WHILE_ACTIVE.
|
|
duplicatePolicy: "JOIN_IDENTICAL",
|
|
execute,
|
|
invalidate: [RESOURCE_INVALIDATION_TOPIC],
|
|
currentData: client.getQueryData(key),
|
|
optimistic: {
|
|
queryKey: key,
|
|
update: (previous, input) => [
|
|
...(previous as string[]),
|
|
input,
|
|
],
|
|
},
|
|
}),
|
|
{ wrapper: wrapper(client) },
|
|
);
|
|
|
|
let first: Promise<ApplicationResult<string>> | null = null;
|
|
let duplicate: Promise<ApplicationResult<string>> | null = null;
|
|
act(() => {
|
|
first = hook.result.current.submit("created");
|
|
duplicate = hook.result.current.submit("created");
|
|
});
|
|
expect(first).toBe(duplicate);
|
|
await waitFor(() =>
|
|
expect(client.getQueryData(key)).toEqual(["existing", "created"]),
|
|
);
|
|
await waitFor(() => expect(execute).toHaveBeenCalledOnce());
|
|
await waitFor(() =>
|
|
expect(hook.result.current.state.indicator).toBe("mutation-pending"),
|
|
);
|
|
|
|
complete({ ok: true, value: "created" });
|
|
if (!first) throw new Error("expected pending mutation");
|
|
await act(() => first);
|
|
expect(client.getQueryState(key)?.isInvalidated).toBe(true);
|
|
await waitFor(() =>
|
|
expect(hook.result.current.state.indicator).toBeNull(),
|
|
);
|
|
});
|
|
|
|
it("never joins distinct mutation inputs to the same runtime promise", async () => {
|
|
const client = queryClient();
|
|
const resolvers = new Map<
|
|
string,
|
|
(value: ApplicationResult<string>) => void
|
|
>();
|
|
const execute = vi.fn(
|
|
(input: string) =>
|
|
new Promise<ApplicationResult<string>>((resolve) => {
|
|
resolvers.set(input, resolve);
|
|
}),
|
|
);
|
|
const hook = renderHook(
|
|
() =>
|
|
useLegacyApplicationMutation<string, string>({
|
|
definitionId: "legacy-parallel-distinct-inputs-v1",
|
|
execute,
|
|
currentData: true,
|
|
}),
|
|
{ wrapper: wrapper(client) },
|
|
);
|
|
|
|
let first: Promise<ApplicationResult<string>> | undefined;
|
|
let second: Promise<ApplicationResult<string>> | undefined;
|
|
act(() => {
|
|
first = hook.result.current.submit("first");
|
|
second = hook.result.current.submit("second");
|
|
});
|
|
expect(first).not.toBe(second);
|
|
await waitFor(() => expect(execute).toHaveBeenCalledTimes(2));
|
|
|
|
resolvers.get("first")?.({ ok: true, value: "first" });
|
|
resolvers.get("second")?.({ ok: true, value: "second" });
|
|
if (!first || !second) throw new Error("expected pending mutations");
|
|
await act(async () => {
|
|
await Promise.all([first, second]);
|
|
});
|
|
});
|
|
|
|
describe("unknown-effect replay (D-1)", () => {
|
|
function replayScope() {
|
|
let token = 0;
|
|
return {
|
|
...scopeSnapshot(),
|
|
identities: createRuntimeIdentityRegistry({
|
|
tokenFactory: () => `replay-identity-token-${String(++token).padStart(4, "0")}`,
|
|
}),
|
|
};
|
|
}
|
|
|
|
function renderKeyedCreate(
|
|
outcomes: ApplicationResult<string>[],
|
|
) {
|
|
const client = queryClient();
|
|
const intents: MutationIntent[] = [];
|
|
const execute = vi.fn(
|
|
async (
|
|
input: string,
|
|
context: Readonly<{ signal: AbortSignal; intent: MutationIntent }>,
|
|
): Promise<ApplicationResult<string>> => {
|
|
intents.push(context.intent);
|
|
return outcomes.shift() ?? { ok: true, value: input };
|
|
},
|
|
);
|
|
const scope = replayScope();
|
|
const hook = renderHook(
|
|
() =>
|
|
useApplicationMutation<string, string>({
|
|
definitionId: "replay-intent-v1",
|
|
definitionVersion: 1,
|
|
operationId: "CREATE_REPLAYED",
|
|
requiresIdempotencyKey: true,
|
|
owner: "platform-test",
|
|
duplicatePolicy: "REJECT_WHILE_ACTIVE",
|
|
scope,
|
|
execute,
|
|
invalidate: [],
|
|
}),
|
|
{ wrapper: wrapper(client) },
|
|
);
|
|
return { hook, intents, execute };
|
|
}
|
|
|
|
const unknown: ApplicationResult<string> = {
|
|
ok: false,
|
|
error: createFailure("SERVER_FAILURE", "CREATE_REPLAYED", 0, {
|
|
effect: "MAYBE_APPLIED",
|
|
}),
|
|
};
|
|
|
|
it("sends the same intent when the same input is saved again after an unknown effect", async () => {
|
|
const { hook, intents } = renderKeyedCreate([unknown]);
|
|
await act(() => hook.result.current.submit("same-input"));
|
|
expect(hook.result.current.state.indicator).toBe(
|
|
"mutation-effect-unknown",
|
|
);
|
|
|
|
await act(() => hook.result.current.submit("same-input"));
|
|
|
|
expect(intents).toHaveLength(2);
|
|
expect(intents[1]).toBe(intents[0]);
|
|
expect(intents[1]?.idempotencyKey).toBe("key-1");
|
|
await waitFor(() =>
|
|
expect(hook.result.current.state.indicator).toBeNull(),
|
|
);
|
|
});
|
|
|
|
it("mints a new key when the input changes after an unknown effect", async () => {
|
|
const { hook, intents } = renderKeyedCreate([unknown]);
|
|
await act(() => hook.result.current.submit("first-input"));
|
|
await act(() => hook.result.current.submit("changed-input"));
|
|
|
|
expect(intents.map((intent) => intent.idempotencyKey)).toEqual([
|
|
"key-1",
|
|
"key-2",
|
|
]);
|
|
// The first request is still unresolved; a different request cannot
|
|
// settle it.
|
|
expect(hook.result.current.state.indicator).toBe(
|
|
"mutation-effect-unknown",
|
|
);
|
|
});
|
|
|
|
it("resends the unknown head request with its original key", async () => {
|
|
const { hook, intents, execute } = renderKeyedCreate([unknown, unknown]);
|
|
await act(() => hook.result.current.submit("resent-input"));
|
|
|
|
let resent: ApplicationResult<string> | null | undefined;
|
|
await act(async () => {
|
|
resent = await hook.result.current.resendUnknownEffect();
|
|
});
|
|
expect(resent).toMatchObject({
|
|
ok: false,
|
|
error: { effect: "MAYBE_APPLIED" },
|
|
});
|
|
await act(async () => {
|
|
resent = await hook.result.current.resendUnknownEffect();
|
|
});
|
|
|
|
expect(resent).toEqual({ ok: true, value: "resent-input" });
|
|
expect(execute.mock.calls.map(([input]) => input)).toEqual([
|
|
"resent-input",
|
|
"resent-input",
|
|
"resent-input",
|
|
]);
|
|
expect(new Set(intents.map((intent) => intent.idempotencyKey))).toEqual(
|
|
new Set(["key-1"]),
|
|
);
|
|
await waitFor(() =>
|
|
expect(hook.result.current.state.indicator).toBeNull(),
|
|
);
|
|
// Nothing is left to resend once the effect is settled.
|
|
await act(async () => {
|
|
resent = await hook.result.current.resendUnknownEffect();
|
|
});
|
|
expect(resent).toBeNull();
|
|
expect(execute).toHaveBeenCalledTimes(3);
|
|
});
|
|
});
|
|
});
|