dsanders11

#51905: test: don't import from ../lib in API tests

Merged
Created: Jun 5, 2026, 7:33:01 PM
Merged: Jun 8, 2026, 11:15:51 AM
4 comments
Target: main

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

Release Notes

Notes: none

Backports

41-x-y
Pending
Waiting for a manual backport
42-x-y
Merged
PR Number
#51914
Merged At
Jun 8, 2026, 3:02:46 PM
Released In
Not yet
Release Date
Not yet
43-x-y
Merged
PR Number
#51913
Merged At
Jun 8, 2026, 3:02:02 PM
Released In
Not yet
Release Date
Not yet

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