#53036: test: enforce awaiting promise returning helpers
Merged
Description of Change
There are a couple dozen places where we aren't awaiting promises in tests, which can lead to flaky behavior or tests not checking what they intend to test. The failure to await waitUntil is particularly problematic, since its unhandled rejection will currently be silently swallowed (may address this in a follow up PR).
Oxlint has a similar rule for this (typescript/no-floating-promises) but it requires type aware linting (which we don't have enabled currently) and applies to all promises. Opting to fix the immediate problem for now and we can adopt typescript/no-floating-promises in the future if we turn on type aware linting.
Checklist
- I have built and tested this change
- I have filled out the PR description
- I have reviewed and verified the changes
-
npm testpasses
Release Notes
Notes: none
Backports
Semver Impact
Major
Breaking changes
Minor
New features
Patch
Bug fixes
None
Docs, tests, etc.
Semantic Versioning helps users understand the impact of updates:
- Major (X.y.z): Breaking changes that may require code modifications
- Minor (x.Y.z): New features that maintain backward compatibility
- Patch (x.y.Z): Bug fixes that don't change the API
- None: Changes that don't affect using facing parts of Electron