mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-07 22:09:57 +00:00
test: fix readonly typing regressions in check baseline
This commit is contained in:
committed by
Peter Steinberger
parent
0e1aa77928
commit
c7c047287e
@@ -411,14 +411,16 @@ describe("redactConfigSnapshot", () => {
|
||||
const cfg = redacted as Record<string, Record<string, unknown>>;
|
||||
const cfgCustom2 = cfg.custom2 as unknown as unknown[];
|
||||
expect(cfgCustom2.length).toBeGreaterThan(0);
|
||||
expect((cfg.custom1.anykey as Record<string, unknown>).mySecret).toBe(REDACTED_SENTINEL);
|
||||
expect(
|
||||
((cfg.custom1 as Record<string, unknown>).anykey as Record<string, unknown>).mySecret,
|
||||
).toBe(REDACTED_SENTINEL);
|
||||
expect((cfgCustom2[0] as Record<string, unknown>).mySecret).toBe(REDACTED_SENTINEL);
|
||||
const out = restored as Record<string, Record<string, unknown>>;
|
||||
const outCustom2 = out.custom2 as unknown as unknown[];
|
||||
expect(outCustom2.length).toBeGreaterThan(0);
|
||||
expect((out.custom1.anykey as Record<string, unknown>).mySecret).toBe(
|
||||
"this-is-a-custom-secret-value",
|
||||
);
|
||||
expect(
|
||||
((out.custom1 as Record<string, unknown>).anykey as Record<string, unknown>).mySecret,
|
||||
).toBe("this-is-a-custom-secret-value");
|
||||
expect((outCustom2[0] as Record<string, unknown>).mySecret).toBe(
|
||||
"this-is-a-custom-secret-value",
|
||||
);
|
||||
@@ -438,14 +440,16 @@ describe("redactConfigSnapshot", () => {
|
||||
const cfg = redacted as Record<string, Record<string, unknown>>;
|
||||
const cfgCustom2 = cfg.custom2 as unknown as unknown[];
|
||||
expect(cfgCustom2.length).toBeGreaterThan(0);
|
||||
expect((cfg.custom1.anykey as Record<string, unknown>).mySecret).toBe(REDACTED_SENTINEL);
|
||||
expect(
|
||||
((cfg.custom1 as Record<string, unknown>).anykey as Record<string, unknown>).mySecret,
|
||||
).toBe(REDACTED_SENTINEL);
|
||||
expect((cfgCustom2[0] as Record<string, unknown>).mySecret).toBe(REDACTED_SENTINEL);
|
||||
const out = restored as Record<string, Record<string, unknown>>;
|
||||
const outCustom2 = out.custom2 as unknown as unknown[];
|
||||
expect(outCustom2.length).toBeGreaterThan(0);
|
||||
expect((out.custom1.anykey as Record<string, unknown>).mySecret).toBe(
|
||||
"this-is-a-custom-secret-value",
|
||||
);
|
||||
expect(
|
||||
((out.custom1 as Record<string, unknown>).anykey as Record<string, unknown>).mySecret,
|
||||
).toBe("this-is-a-custom-secret-value");
|
||||
expect((outCustom2[0] as Record<string, unknown>).mySecret).toBe(
|
||||
"this-is-a-custom-secret-value",
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user