mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-08 08:29:42 +02:00
feat(tabs): COD-359 add owner-scoped tab layouts
This commit is contained in:
@@ -199,6 +199,20 @@ describe('StateStore', () => {
|
||||
expect(store.getSession('pinned-1')).not.toBeNull();
|
||||
expect(store.getSession('plain-1')).toBeNull();
|
||||
});
|
||||
|
||||
it('cleans only requested unpinned session ids', () => {
|
||||
const store = new StateStore(testFilePath);
|
||||
store.setSession('requested', createMockSessionState('requested'));
|
||||
store.setSession('pinned', { ...createMockSessionState('pinned'), pinned: true, pinnedAt: Date.now() });
|
||||
store.setSession('unrequested', createMockSessionState('unrequested'));
|
||||
|
||||
const result = store.cleanupSessionsByIds(new Set(['requested', 'pinned', 'missing']));
|
||||
|
||||
expect(result.cleaned.map((session) => session.id)).toEqual(['requested']);
|
||||
expect(store.getSession('requested')).toBeNull();
|
||||
expect(store.getSession('pinned')).not.toBeNull();
|
||||
expect(store.getSession('unrequested')).not.toBeNull();
|
||||
});
|
||||
});
|
||||
|
||||
describe('task operations', () => {
|
||||
|
||||
Reference in New Issue
Block a user