forked from phenom/healer-man
Release Healer Man 0.1.30
This commit is contained in:
1 parent
544c1bee91
commit
7d7fd567f0
845 files changed
+2040
-87
No files matched your search
@@ -1,4 +1,4 @@
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
|
||||
const content = vi.hoisted(() => ({
|
||||
usable: false,
|
||||
@@ -35,13 +35,26 @@ import {
|
||||
} from "./combatMediaPack";
|
||||
|
||||
beforeEach(() => {
|
||||
vi.stubEnv("DEV", false);
|
||||
content.usable = false;
|
||||
content.install.mockReset();
|
||||
content.remove.mockClear();
|
||||
vi.unstubAllGlobals();
|
||||
});
|
||||
|
||||
afterEach(() => vi.unstubAllEnvs());
|
||||
|
||||
describe("original combat media pack", () => {
|
||||
it("uses the locally served originals in development without downloading a release pack", async () => {
|
||||
vi.stubEnv("DEV", true);
|
||||
const response = new Response("original graph");
|
||||
const fetch = vi.fn(async () => response);
|
||||
vi.stubGlobal("fetch", fetch);
|
||||
await expect(ensureCombatMediaPack()).resolves.toBe(true);
|
||||
await expect(fetchCombatMediaAsset("/assets/game/combat-effects/manifest.json")).resolves.toBe(response);
|
||||
expect(content.install).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it("uses the shared verified content-pack installer", async () => {
|
||||
const progress = vi.fn();
|
||||
await expect(downloadCombatMediaPack(progress)).resolves.toEqual({ fileCount: 12 });
|
||||
|
||||
Reference in new issue
Block a user