#54734: test: stop a leftover net log before the next netLog test
Merged
Description of Change
In api-net-log.spec.ts, if a test failed while logging, the afterEach hook asserted that logging had stopped.
That assertion failed too, and logging stayed on.
Every later test in the file, and every retry, then failed in beforeEach's "not currently logging" check.
This change makes afterEach stop any log that is still running, before deleting the dump files, and drops the hook's assertion.
Only test code changes.
Validation
Ran on a local Linux testing build of main under Xvfb:
e test --files spec/api-net-log.spec.ts: 5 passed.- As a control, I made the test throw once on its first attempt and ran it with CI retries (
CI=1). Onmain, all 5 tests in the file failed through all 3 retries. With this change, all 5 passed. script/lint.js --jsandtsc -p tsconfig.spec.jsonpass.
🤖 Generated with Claude Code
Checklist
- I have built and tested this change
- I have filled out the PR description
- I have reviewed and verified the changes
-
npm testpasses - tests are changed or added
- PR release notes describe the change in a way relevant to app developers, and are capitalized, punctuated, and past tense.
Release Notes
Notes: none
Backports
45-x-y
MergedPR Number
#54766Merged At
Oct 8, 2026, 10:59:47 AM
Released In
v45.0.0-beta.1Release Date
Oct 8, 2026, 7:07:44 PM
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