test: dedupe security cli mock reads

This commit is contained in:
Peter Steinberger
2026-05-13 03:19:01 +01:00
parent 597c69036d
commit 00a01d1a39

View File

@@ -76,13 +76,13 @@ function primeDeepAuditConfig(sourceConfig = { gateway: { mode: "local" } }) {
}
function lastSecretResolverOptions(): Record<string, unknown> | undefined {
return resolveCommandSecretRefsViaGateway.mock.calls.at(-1)?.[0] as
| Record<string, unknown>
| undefined;
const calls = resolveCommandSecretRefsViaGateway.mock.calls;
return calls[calls.length - 1]?.[0] as Record<string, unknown> | undefined;
}
function lastSecurityAuditOptions(): Record<string, unknown> | undefined {
return runSecurityAudit.mock.calls.at(-1)?.[0] as Record<string, unknown> | undefined;
const calls = runSecurityAudit.mock.calls;
return calls[calls.length - 1]?.[0] as Record<string, unknown> | undefined;
}
describe("security CLI", () => {