Refactor platform UI and data flow across core pages
All checks were successful
Build Org Website / build (push) Successful in 50s
All checks were successful
Build Org Website / build (push) Successful in 50s
This commit is contained in:
16
tests/princess-lima-state.test.cjs
Normal file → Executable file
16
tests/princess-lima-state.test.cjs
Normal file → Executable file
@@ -12,6 +12,22 @@ test("fresh save uses the Princess Lima schema and safe village start", () => {
|
||||
assert.equal(fresh.region, "village");
|
||||
assert.deepEqual({ x: fresh.position.x, y: fresh.position.y }, data.MAPS.village.spawns.start);
|
||||
assert.equal(fresh.settings.soundEnabled, false);
|
||||
assert.equal(fresh.introSeen, false);
|
||||
assert.equal(fresh.settings.subtitles, true);
|
||||
assert.equal(fresh.settings.narrationEnabled, true);
|
||||
});
|
||||
|
||||
test("old v1 saves continue without unexpectedly replaying the new introduction", () => {
|
||||
const candidate = state.fresh("Legacy", "azure");
|
||||
delete candidate.introSeen;
|
||||
delete candidate.settings.voice;
|
||||
delete candidate.settings.subtitles;
|
||||
delete candidate.settings.narrationEnabled;
|
||||
const restored = state.normalize(candidate);
|
||||
assert.equal(restored.introSeen, true);
|
||||
assert.equal(restored.settings.voice, 0.85);
|
||||
assert.equal(restored.settings.subtitles, true);
|
||||
assert.equal(restored.settings.narrationEnabled, true);
|
||||
});
|
||||
|
||||
test("names and appearances validate", () => {
|
||||
|
||||
Reference in New Issue
Block a user