Skip to content

Commit 5b61b50

Browse files
author
Paul Wang
authored
More compile fixes (#89)
1 parent 8cadc4d commit 5b61b50

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

src/vs/workbench/contrib/terminal/test/browser/terminalInstance.test.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,8 @@ class TestTerminalInstanceService extends Disposable implements Partial<ITermina
134134
this._resolveProcessCreated();
135135
return this._register(new TestTerminalChildProcess(shouldPersist));
136136
},
137-
getLatency: () => Promise.resolve([])
137+
getLatency: () => Promise.resolve([]),
138+
getShellEnvironment: () => Promise.resolve({})
138139
} as unknown as ITerminalBackend;
139140
}
140141
}
@@ -212,15 +213,16 @@ suite('Workbench - TerminalInstance', () => {
212213
const instance = await createTerminalInstance(terminalInstanceService, new Workspace('empty'));
213214
await terminalInstanceService.processCreatedPromise;
214215
await new Promise(resolve => setTimeout(resolve, 0));
215-
const testInstance = instance as unknown as { _cwd: string; _userHome: string; _createProcess(): Promise<void> };
216+
const testInstance = instance as unknown as { _cwd: string; _userHome: string };
217+
const createProcess = () => (instance as unknown as Record<string, () => Promise<void>>)['_createProcess']();
216218
testInstance._cwd = '/unexpected';
217219
testInstance._userHome = '/home';
218220
const exitPromise = Event.toPromise(instance.onExit);
219221

220-
await testInstance._createProcess();
222+
await createProcess();
221223
const exitResult = await exitPromise;
222224

223-
ok(exitResult && typeof exitResult === 'object' && 'message' in exitResult);
225+
ok(exitResult && typeof exitResult === 'object' && typeof exitResult.message === 'string');
224226
strictEqual(terminalInstanceService.createProcessCount, 1);
225227
});
226228

0 commit comments

Comments
 (0)