add test for refreshAvailableProfiles again if no profiles are returned from local/remoteTerminalService #136318
Labels
debt
Code quality issues
insiders-released
Patch has been released in VS Code Insiders
terminal
Integrated terminal issues
Milestone
by creating a terminalOffProcessService that first returns none then returns some profiles
test('should call refreshAvailableProfiles again if no profiles are returned from local/remoteTerminalService', async () => {
// localTerminalService.setProfiles([]);
// const calls: ITerminalProfile[] = [];
// let countCalled = 0;
// await new Promise(r => {
// terminalProfileService.onDidChangeAvailableProfiles(e => {
// calls.push(...e);
// countCalled++;
// r();
// });
// });
// terminalProfileService.refreshAvailableProfiles();
// assert(countCalled === 0, true);
// deepStrictEqual(calls, [powershellProfile]);
// deepStrictEqual(terminalProfileService.availableProfiles, []);
// deepStrictEqual(terminalProfileService.contributedProfiles, [jsdebugProfile]);
// localTerminalService.setProfiles([powershellProfile]);
// await terminalProfileService.refreshAndAwaitAvailableProfiles();
// assert(countCalled === 1, true);
// deepStrictEqual(calls, [powershellProfile]);
// deepStrictEqual(terminalProfileService.availableProfiles, [powershellProfile]);
// deepStrictEqual(terminalProfileService.contributedProfiles, [jsdebugProfile]);
});
The text was updated successfully, but these errors were encountered: