mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 13:00:41 +00:00
test: tighten storage doctor assertions
This commit is contained in:
@@ -174,7 +174,8 @@ describe("doctor command", () => {
|
||||
throw new Error("Expected doctor to write migrated auth profiles");
|
||||
}
|
||||
const profiles = (written.auth as { profiles: Record<string, unknown> }).profiles;
|
||||
expect(profiles["anthropic:me@example.com"]).toEqual(expect.any(Object));
|
||||
expect(profiles).toHaveProperty("anthropic:me@example.com");
|
||||
expect(profiles["anthropic:me@example.com"]).not.toBeNull();
|
||||
expect(profiles["anthropic:default"]).toBeUndefined();
|
||||
}, 30_000);
|
||||
});
|
||||
|
||||
@@ -571,7 +571,8 @@ describe("loadSettings default gateway URL derivation", () => {
|
||||
|
||||
const persisted = JSON.parse(localStorage.getItem(scopedKey) ?? "{}");
|
||||
|
||||
expect(persisted.sessionsByGateway).toEqual(expect.any(Object));
|
||||
expect(persisted.sessionsByGateway).toBeTypeOf("object");
|
||||
expect(persisted.sessionsByGateway).not.toBeNull();
|
||||
const scopes = Object.keys(persisted.sessionsByGateway);
|
||||
expect(scopes).toHaveLength(10);
|
||||
// oldest stale entries should be evicted
|
||||
|
||||
Reference in New Issue
Block a user