mirror of
https://github.com/morluto/rea.git
synced 2026-12-06 15:33:56 +08:00
test(desktop): share value check fixture builder (#17383)
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -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}`;
|
||||
|
||||
Reference in New Issue
Block a user