Sebastian Poxhofer
7436b80cda
test(linter): add renovate/no-redundant-mock-reset rule ( #44557 )
...
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 >
2026-07-14 11:26:20 +00:00
..
2026-02-06 13:40:01 +00:00
2026-03-31 12:08:39 +00:00
2026-05-15 07:03:15 +00:00
2026-05-30 16:01:58 +00:00
2026-05-27 09:39:52 +00:00
2026-07-06 00:30:55 +00:00
2026-05-30 16:01:58 +00:00
2026-03-10 09:57:31 +00:00
2026-05-30 16:01:58 +00:00
2026-06-09 06:50:08 +00:00
2026-05-15 15:40:22 +00:00
2026-01-26 22:48:17 +00:00
2026-04-14 14:26:46 +00:00
2026-05-30 16:01:58 +00:00
2026-05-19 13:31:27 +00:00
2026-05-30 16:01:58 +00:00
2026-05-15 15:40:22 +00:00
2026-01-26 22:48:17 +00:00
2026-05-19 13:31:27 +00:00
2026-05-13 16:23:10 +00:00
2026-05-30 16:01:58 +00:00
2026-05-27 09:39:52 +00:00
2026-05-30 16:01:58 +00:00
2026-05-30 16:01:58 +00:00
2026-05-15 15:40:22 +00:00
2026-07-07 17:47:04 +00:00
2026-05-26 20:03:23 +00:00
2026-07-14 11:26:20 +00:00
2026-03-31 12:08:39 +00:00
2026-05-30 16:01:58 +00:00
2026-05-30 16:01:58 +00:00
2026-07-10 06:29:59 +00:00
2026-07-07 17:47:04 +00:00
2026-05-29 06:55:58 +00:00
2026-05-30 16:01:58 +00:00
2026-05-30 16:01:58 +00:00
2026-05-30 16:01:58 +00:00
2026-05-19 13:31:27 +00:00
2026-05-19 13:31:27 +00:00
2026-06-02 13:29:48 +00:00
2026-06-19 10:35:11 +00:00
2026-05-30 16:01:58 +00:00
2026-05-18 09:09:21 +00:00
2026-07-13 00:32:05 +00:00
2026-05-30 16:01:58 +00:00
2026-05-30 16:01:58 +00:00
2026-05-30 16:01:58 +00:00
2026-05-30 16:01:58 +00:00
2026-07-10 10:06:16 +00:00
2026-05-27 09:39:52 +00:00
2026-05-15 15:40:22 +00:00
2026-07-10 10:06:16 +00:00
2026-05-13 16:23:10 +00:00
2026-02-18 08:41:34 +00:00
2026-07-14 10:15:55 +00:00
2026-02-06 13:40:01 +00:00
2026-06-13 11:44:47 +00:00
2026-05-15 15:40:22 +00:00
2026-06-02 13:29:48 +00:00
2026-04-22 15:38:46 +00:00
2026-02-06 13:40:01 +00:00
2026-02-06 13:40:01 +00:00
2026-05-15 15:40:22 +00:00
2026-02-06 15:34:33 +00:00
2026-05-30 16:01:58 +00:00
2026-05-26 07:53:07 +00:00
2026-03-31 12:08:39 +00:00
2026-05-29 06:55:58 +00:00
2026-05-15 15:40:22 +00:00
2026-02-06 13:40:01 +00:00
2026-07-08 12:25:54 +00:00
2026-07-14 11:26:20 +00:00
2026-07-14 10:52:27 +00:00
2026-05-30 16:01:58 +00:00
2026-01-26 22:48:17 +00:00
2026-07-14 10:15:55 +00:00
2026-07-02 05:13:47 +00:00
2026-01-26 22:48:17 +00:00
2026-05-30 16:01:58 +00:00
2026-05-08 07:01:27 +00:00
2026-06-09 06:50:08 +00:00
2026-05-30 16:01:58 +00:00
2026-05-15 15:40:22 +00:00
2026-02-06 13:40:01 +00:00
2026-07-14 11:26:20 +00:00
2026-05-19 13:31:27 +00:00
2026-05-30 16:01:58 +00:00
2026-05-30 16:01:58 +00:00
2026-05-19 13:31:27 +00:00
2026-05-30 16:01:58 +00:00
2026-06-25 05:51:41 +00:00
2026-02-06 13:40:01 +00:00
2026-01-26 22:48:17 +00:00
2026-05-30 16:01:58 +00:00
2026-05-30 16:01:58 +00:00
2026-01-26 22:48:17 +00:00
2026-01-26 22:48:17 +00:00
2026-07-07 17:47:04 +00:00
2026-04-13 17:24:56 +00:00
2026-01-26 22:48:17 +00:00
2026-03-31 12:08:39 +00:00
2026-06-16 05:48:01 +00:00
2026-07-14 10:15:55 +00:00
2026-05-05 13:52:03 +00:00
2026-07-07 17:47:04 +00:00
2026-01-26 22:48:17 +00:00
2026-05-19 13:31:27 +00:00
2026-01-26 22:48:17 +00:00
2026-03-31 12:08:39 +00:00
2026-02-06 13:40:01 +00:00
2026-05-27 09:39:52 +00:00
2026-05-08 07:01:27 +00:00
2026-02-06 13:40:01 +00:00
2026-06-02 12:07:35 +00:00
2026-02-06 13:40:01 +00:00
2026-05-30 16:01:58 +00:00
2026-05-20 15:22:59 +00:00
2026-01-26 22:48:17 +00:00
2026-03-31 12:08:39 +00:00
2026-03-31 12:08:39 +00:00
2026-01-29 14:21:41 +00:00
2026-01-26 22:48:17 +00:00
2026-05-07 13:14:48 +00:00
2026-01-26 22:48:17 +00:00
2026-01-26 22:48:17 +00:00