#51905: test: don't import from ../lib in API tests
Merged
Description of Change
We shouldn't be reaching into ../lib/ during API tests as we want to be writing integration tests, not testing implementation details. Sets an oxlint rule (no-restricted-imports) to enforce this and cleans up the few violations we had. There's still one violation but I disabled the rule for that specific case (importing roleList) as there wasn't a clear clean up for that one.
Limiting this to just API tests since we have a handful of useful test coverage that's providing unit test level coverage for a few internal functions in other test files.
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