forked from phenom/healer-man
Update Healer Man server
This commit is contained in:
1 parent
4c768fbec6
commit
b16821e92e
330 files changed
+35406
-1760
No files matched your search
@@ -0,0 +1,31 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import {
|
||||
DEFAULT_GRAPHICS_SETTINGS,
|
||||
ambientFillMultiplier,
|
||||
nextGraphicsChoice,
|
||||
normalizeGraphicsSettings,
|
||||
RENDER_SCALES,
|
||||
} from "./graphicsSettings";
|
||||
|
||||
describe("dungeon graphics settings", () => {
|
||||
it("keeps known choices and rejects invalid saved values", () => {
|
||||
expect(normalizeGraphicsSettings(DEFAULT_GRAPHICS_SETTINGS, {
|
||||
renderScale: 2,
|
||||
textureFiltering: 16,
|
||||
shadowQuality: "high",
|
||||
ambientFill: "low",
|
||||
})).toEqual({ renderScale: 2, textureFiltering: 16, shadowQuality: "high", ambientFill: "low" });
|
||||
expect(normalizeGraphicsSettings(DEFAULT_GRAPHICS_SETTINGS, {
|
||||
renderScale: 5 as 2,
|
||||
textureFiltering: 8 as 16,
|
||||
shadowQuality: "ultra" as "high",
|
||||
})).toEqual(DEFAULT_GRAPHICS_SETTINGS);
|
||||
});
|
||||
|
||||
it("cycles all resolution choices and keeps authored ambient fill unchanged", () => {
|
||||
expect(nextGraphicsChoice(2, RENDER_SCALES)).toBe("adaptive");
|
||||
expect(ambientFillMultiplier("authored")).toBe(1);
|
||||
expect(ambientFillMultiplier("low")).toBeLessThan(1);
|
||||
expect(ambientFillMultiplier("high")).toBeGreaterThan(1);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user