Update Healer Man server
This commit is contained in:
1 parent
f8314e7de1
commit
1fedb9368d
76 files changed
+20556
-2523
No files matched your search
@@ -0,0 +1,33 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { companionSpecReadinessFromCache } from "./companionSpecReadiness";
|
||||
|
||||
describe("companion readiness offline cache", () => {
|
||||
it("falls back to shipped defaults when the cached policy is corrupt", () => {
|
||||
const cached = companionSpecReadinessFromCache("{not-json");
|
||||
expect(cached.revision).toBe(0);
|
||||
expect(cached.config.statuses["warrior:protection"]).toBe("ready");
|
||||
expect(Object.values(cached.config.statuses).filter((status) => status === "ready")).toHaveLength(5);
|
||||
});
|
||||
|
||||
it("retains the last valid published policy for offline play", () => {
|
||||
const cached = companionSpecReadinessFromCache(JSON.stringify({
|
||||
revision: 4,
|
||||
updatedAt: 123,
|
||||
updatedBy: "Phenom",
|
||||
config: {
|
||||
schemaVersion: 1,
|
||||
statuses: {
|
||||
"warrior:protection": "ready",
|
||||
"priest:discipline": "ready",
|
||||
"hunter:marksmanship": "ready",
|
||||
"mage:fire": "ready",
|
||||
"rogue:assassination": "ready",
|
||||
"paladin:retribution": "beta",
|
||||
},
|
||||
},
|
||||
}));
|
||||
expect(cached.revision).toBe(4);
|
||||
expect(cached.config.statuses["paladin:retribution"]).toBe("beta");
|
||||
expect(cached.config.statuses["druid:balance"]).toBe("needs-testing");
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user