test(desktop): share value check fixture builder (#17383)

This commit is contained in:
Vincent Koc
2026-12-06 12:44:31 +08:00
committed by GitHub
parent 1e59087c47
commit 155d664c6b
2 changed files with 358 additions and 630 deletions
File diff suppressed because it is too large Load Diff
+5 -11
View File
@@ -7,22 +7,16 @@ import {
type TaskCheckOutcome,
type TaskFileView,
} from "./appTaskChecks.js";
import { CHECK_CASES, CHECK_VIEWS } from "./appTaskChecks.fixture.js";
import {
CHECK_CASES,
CHECK_VIEWS,
valueCheck,
} from "./appTaskChecks.fixture.js";
import { textView, xmlView } from "./stateFormats.js";
import { elementText } from "./viewPointer.js";
import { redactSecretsInJson } from "./buildSecrets.js";
const valueCheck = <
Kind extends "value_equals" | "text_equals" | "text_contains",
Value extends JsonValue,
>(
kind: Kind,
file: string,
pointer: string,
value: Value,
) => ({ kind, file, pointer, value });
it("redacts full check values before shortening descriptions without changing the verdict", () => {
const secret = "e-Plum7-Kite-Throwaway-42";
const actual = `${"x".repeat(180)}${secret}`;