#54166: test: assert that import and require expose the same electron module
Merged
Created: Sep 21, 2026, 4:11:51 AM
Merged: Sep 21, 2026, 3:09:49 PM
5 comments
Target: main
Description of Change
Before: esm-spec only checked that import 'electron' (and electron/main, /common, /renderer, /utility) does not throw. Nothing verified that what ES module code gets back is the same thing require('electron') returns.
After: a new fixture app loads the module through both import() and require() in the main process, a utility process and a non-sandboxed preload, and reports any export that exists on only one side, any export that is not the identical object on both, and a default import that is not the require() exports object. esm-spec asserts the report is empty for each process type.
Checklist
- I have filled out the PR description
- I have reviewed and verified the changes
- tests are changed or added
Release Notes
Notes: none
Generated by Claude Code
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