refactor(state): fix code quality findings for nav panel store and prefs
This commit is contained in:
@@ -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', () => {
|
||||
|
||||
Reference in New Issue
Block a user