Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add test for refreshAvailableProfiles again if no profiles are returned from local/remoteTerminalService #136318

Closed
meganrogge opened this issue Nov 2, 2021 · 0 comments
Assignees
Labels
debt Code quality issues insiders-released Patch has been released in VS Code Insiders terminal Integrated terminal issues
Milestone

Comments

@meganrogge
Copy link
Contributor

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]);
});

@meganrogge meganrogge self-assigned this Nov 2, 2021
@meganrogge meganrogge added this to the November 2021 milestone Nov 2, 2021
@meganrogge meganrogge added debt Code quality issues terminal Integrated terminal issues labels Nov 3, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Dec 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
debt Code quality issues insiders-released Patch has been released in VS Code Insiders terminal Integrated terminal issues
Projects
None yet
Development

No branches or pull requests

2 participants
@meganrogge and others