-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathtestStore.js
More file actions
39 lines (32 loc) · 989 Bytes
/
testStore.js
File metadata and controls
39 lines (32 loc) · 989 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// Simple test script to verify store functionality
const { useStore } = require('./dist/renderer/assets/index-C5RtyYIn.js');
console.log('Testing store implementation...');
// Get the store state
const store = useStore.getState();
console.log('Initial store state:', {
repos: Object.keys(store.repos),
workspaces: Object.keys(store.workspaces),
selectedRepoPath: store.selectedRepoPath,
selectedWorkspaceId: store.selectedWorkspaceId,
selectedSessionId: store.selectedSessionId,
});
// Test adding a repo
const repo = {
path: '/test/repo',
name: 'Test Repo',
workspaceIds: [],
metadata: {
lastAccessed: Date.now(),
},
gitRemote: {
originUrl: 'https://github.com/test/repo',
defaultBranch: 'main',
},
};
console.log('Adding repo...');
store.addRepo(repo);
console.log('Store state after adding repo:', {
repos: Object.keys(store.repos),
workspaces: Object.keys(store.workspaces),
});
console.log('Repo in store:', store.repos['/test/repo']);