mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 14:50:42 +00:00
test: clarify plugin state probe assertions
This commit is contained in:
@@ -264,7 +264,8 @@ describe("failure safety", () => {
|
||||
expect(result.ok).toBe(true);
|
||||
expect(result.dbPath).toContain("state.sqlite");
|
||||
expect(result.steps.length).toBeGreaterThanOrEqual(4);
|
||||
expect(result.steps.every((s) => s.ok)).toBe(true);
|
||||
const failedSteps = result.steps.filter((step) => !step.ok);
|
||||
expect(failedSteps).toEqual([]);
|
||||
|
||||
// The probe's temporary stored value must not leak into the result.
|
||||
const serialised = JSON.stringify(result);
|
||||
|
||||
@@ -465,7 +465,8 @@ describe("plugin state keyed store", () => {
|
||||
await withOpenClawTestState({ label: "plugin-state-probe" }, async () => {
|
||||
const result = probePluginStateStore();
|
||||
expect(result.ok).toBe(true);
|
||||
expect(result.steps.every((step) => step.ok)).toBe(true);
|
||||
const failedSteps = result.steps.filter((step) => !step.ok);
|
||||
expect(failedSteps).toEqual([]);
|
||||
expect(JSON.stringify(result)).not.toContain("probe-value");
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user