refactor(state): fix code quality findings for nav panel store and prefs

This commit is contained in:
ginnoir
2026-06-11 21:12:20 -05:00
parent 9b2793b264
commit 09e2d06b87
4 changed files with 75 additions and 12 deletions
+11 -1
View File
@@ -1,4 +1,5 @@
import { beforeEach, describe, expect, it, vi } from 'vitest';
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
import { getPrefs } from '../prefs';
import { useGameStore } from '../store';
describe('game store nav and prefs', () => {
@@ -12,6 +13,15 @@ describe('game store nav and prefs', () => {
store[key] = value;
},
});
useGameStore.setState({
activePanel: 'play',
selectedStoryNodeId: null,
prefs: getPrefs(),
});
});
afterEach(() => {
vi.unstubAllGlobals();
});
it('has default activePanel and selectedStoryNodeId', () => {