Skip to content

Commit 19bbb07

Browse files
committed
Fix some tests
1 parent 2f48bc0 commit 19bbb07

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/test/issues/stateManager.test.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,15 @@ describe('StateManager branch behavior with useBranchForIssues setting', functio
161161
credentialStore: { isAnyAuthenticated: () => true, getCurrentUser: async () => ({ login: 'testuser' }) },
162162
} as any, mockContext);
163163

164+
(stateManager as any)._queries = [{ label: 'Test', query: 'is:open assignee:@me repo:owner/repo ', groupBy: [] }];
165+
164166
// Manually trigger the setIssueData flow
165167
await (stateManager as any).setIssueData(mockFolderManager);
166168

169+
// Await the collection promise so setIssues completes
170+
const collection = stateManager.getIssueCollection(mockUri);
171+
await collection.get('Test');
172+
167173
// If we get here without assertion failures in getIssues, the test passed
168174
} finally {
169175
vscode.workspace.getConfiguration = originalGetConfiguration;
@@ -251,6 +257,8 @@ describe('StateManager branch behavior with useBranchForIssues setting', functio
251257
credentialStore: { isAnyAuthenticated: () => true, getCurrentUser: async () => ({ login: 'testuser' }) },
252258
} as any, mockContext);
253259

260+
(sm as any)._queries = [{ label: 'Test', query: 'is:open repo:owner/repo', groupBy: [] }];
261+
254262
await (sm as any).setIssueData(mockFolderManager);
255263

256264
// Verify that the promises in issueCollection resolve (not reject)

0 commit comments

Comments
 (0)