Repository navigation
fix: handle createWindow() rejection in import-meta test fixture - #51441
Merged
Merged
Conversation
Remove macOS dock handling boilerplate code from electron-quick-start. This test fixture is a short-lived process that calls process.exit() on completion, so we don't need it.
The createWindow() promise was fire-and-forget. If loadFile() or executeJavaScript() rejects transiently, process.exit() was never called and the process would hang.
6 tasks done
dsanders11
approved these changes
May 4, 2026
|
No Release Notes |
This was referenced May 4, 2026
Contributor
|
I have automatically backported this PR to "42-x-y", please check out #51468 |
Contributor
|
I have automatically backported this PR to "41-x-y", please check out #51469 |
Contributor
|
I have automatically backported this PR to "40-x-y", please check out #51470 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of Change
Potential fix for an esm-spec.ts test flake in "should use import.meta callback handling from Node.js for Node.js modules".
The
import-metafixture'screateWindow()is async but was called fire-and-forget. IfloadFile()orexecuteJavaScript()rejects transiently,process.exit()is never reached. OnmacOSthe process hangs indefinitely because'window-all-closed'had aprocess.platform !== 'darwin'guard that skippedapp.quit().It's hard to prove that a test flake is fixed, but this theory matches the behavior and is worthwhile as a spec cleanup either way. edit: only a cleanup, unfortunately. The CI failure is still there.
Sample CI failure:
Complements #51432. This PR is "try to fix the test", and 51432 is "try to fix the runner to not hang on a failed test".
Checklist
npm testpassesRelease Notes
Notes: none.