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

Avoid calling resolve after reject #123

Merged
merged 1 commit into from Feb 2, 2022
Merged

Avoid calling resolve after reject #123

merged 1 commit into from Feb 2, 2022

Conversation

fpoli
Copy link
Contributor

@fpoli fpoli commented Feb 2, 2022

The implementation of runTests returns a promise that, in case of failure, invokes both the resolve and reject callbacks. It looks like a bug and this PR fixes that.

vscode-test/lib/runTest.ts

Lines 182 to 189 in 8e8d7a8

if (code === null) {
reject(signal);
} else if (code !== 0) {
reject('Failed');
}
console.log('Done\n');
resolve(code ?? -1);

@connor4312 connor4312 merged commit 25eafb9 into microsoft:main Feb 2, 2022
@fpoli fpoli deleted the patch-1 branch February 2, 2022 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants