ci(linter): add renovate/no-redundant-mock-reset rule
Vitest sets mockReset: true globally in vitest.config.mts, which resets
all mocks before each test. This makes vi.resetAllMocks() /
vi.clearAllMocks() and per-mock .mockReset() / .mockClear() calls inside
beforeEach/afterEach hooks redundant. Add a custom oxlint rule (enabled
for **/*.spec.ts and test/**) flagging such calls, and remove the 40
redundant calls it found. restoreAllMocks/mockRestore are not flagged
because restoreMocks is not enabled globally.
Two sites keep an inline disable with a reason: nested beforeEach hooks
in filter-checks.spec.ts and onboarding/pr/index.spec.ts intentionally
call mockReset() to discard once-values queued by an outer beforeEach.
Requested by maintainer review feedback (review comment 3052324877).
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
* fix: join env var lines with os.EOL to fix test failure on different systems
* fix: update test data to achieve full test coverage
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
* fix: fix failed hermit binary source tests due to findUp module acts differently in windows
* fix: set localDir in GlobalConfig in getHermitEnvs test
* Apply suggestions from code review
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
* fix: added two more mockResolvedValueOnce for extra test case and remove mockResolvedValueOnce('')
Co-authored-by: Rhys Arkins <rhys@arkins.net>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>