@@ -8,13 +8,20 @@ import { testCredentialsWithStub } from "../factories/authentication";
88import { Credentials } from "../../src/common/authentication" ;
99import { AppCommandManager } from "../../src/common/commands" ;
1010import { createMockCommandManager } from "./commandsMock" ;
11+ import type {
12+ Event ,
13+ WorkspaceFolder ,
14+ WorkspaceFoldersChangeEvent ,
15+ } from "vscode" ;
1116
1217export function createMockApp ( {
1318 extensionPath = "/mock/extension/path" ,
1419 workspaceStoragePath = "/mock/workspace/storage/path" ,
1520 globalStoragePath = "/mock/global/storage/path" ,
1621 createEventEmitter = < T > ( ) => new MockAppEventEmitter < T > ( ) ,
1722 workspaceState = createMockMemento ( ) ,
23+ workspaceFolders = [ ] ,
24+ onDidChangeWorkspaceFolders = jest . fn ( ) ,
1825 credentials = testCredentialsWithStub ( ) ,
1926 commands = createMockCommandManager ( ) ,
2027} : {
@@ -23,6 +30,8 @@ export function createMockApp({
2330 globalStoragePath ?: string ;
2431 createEventEmitter ?: < T > ( ) => AppEventEmitter < T > ;
2532 workspaceState ?: Memento ;
33+ workspaceFolders ?: readonly WorkspaceFolder [ ] | undefined ;
34+ onDidChangeWorkspaceFolders ?: Event < WorkspaceFoldersChangeEvent > ;
2635 credentials ?: Credentials ;
2736 commands ?: AppCommandManager ;
2837} ) : App {
@@ -34,6 +43,8 @@ export function createMockApp({
3443 workspaceStoragePath,
3544 globalStoragePath,
3645 workspaceState,
46+ workspaceFolders,
47+ onDidChangeWorkspaceFolders,
3748 createEventEmitter,
3849 credentials,
3950 commands,
0 commit comments