Commit Graph

18 Commits

Author SHA1 Message Date
Sebastian Poxhofer 05e1271376 test: use expect().resolves instead of awaiting inside expect (#45672)
Enables the vitest/prefer-expect-resolves oxlint rule and applies its
autofix across the spec suite.
2026-09-04 10:40:46 +00:00
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
Jamie Tanna 0ccf83253f feat(presets): support fetching .jsonc files (#43680)
* test(presets): validate filename construction

Ahead of future changes to add JSONC support, we should cover explicitly
how the filename is constructed.

* feat(presets): support fetching `.jsonc` files

Similar to 6fb540d494, as we now support a
`.jsonc` file for configuration, we should make sure that we can also
use it for a preset.

We can also add additional tests across a few presets to make sure that
we have sufficient coverage.
2026-05-29 15:10:13 +00:00
Sergei Zharinov b57fc5dd13 feat: enable vitest plugin in oxlint (#41579)
* chore: Add vitest plugin to oxlint

* Remove unused line in versioning spec

* Remove coverage threshold check job

The coverage threshold check has been removed from the build workflow. This job was redundant as
coverage is already handled by the codecov job.

* Refine versioning API schema with existence check

* Revert "Remove coverage threshold check job"

This reverts commit f2c9dd872b.

* Remove vitest ESLint plugin

The vitest ESLint plugin and its configurations have been removed. ESLint will no longer enforce
vitest-specific rules.

* Remove unused vitest eslint plugin

The `@vitest/eslint-plugin` is no longer used and can be safely removed.
2026-03-02 13:02:25 +00:00
Sergei Zharinov 930cf6633c refactor: Rewrite imports with .ts extensions (#40700)
fix: Additional vi.mock path corrections and prettier formatting
2026-01-26 22:48:17 +00:00
Rhys Arkins 6dee68227c chore(eslint): report unused directives error (#35124) 2025-04-01 12:47:33 +00:00
Trim21 6e5731b554 test: migrate from jest to vitest (#34499) 2025-02-26 14:18:38 +00:00
Michael Kriese 997c23502e test: migrate to vitest (#34475)
Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>
2025-02-26 09:35:54 +00:00
Sergei Zharinov b69416ce17 refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
Michael Kriese 982cefff2b refactor(config): strict null checks (#15291)
* refactor(config): strict null checks

* chore: fix test
2022-04-24 22:48:54 +00:00
Michael Kriese 64f5bd5f03 test: enforce lint style rules (#15085) 2022-04-12 14:49:49 +00:00
Rhys Arkins 68a4415eb4 refactor(config): rename preset packageName/pkgName to repo (#14453) 2022-02-28 17:39:44 +01:00
Max Rose 977a027125 fix(presets): log depreciation only if fallback found (#14281) 2022-02-18 03:54:40 +01:00
Sergei Zharinov 5f4b9f9a3a test: Fix test descriptions and enforce it via new linting rule (#11285) 2021-08-18 05:46:56 +00:00
Michael Kriese 9ca604b345 refactor: extract more types (#9959) 2021-05-11 19:08:02 +02:00
Sergei Zharinov ce51f05cef feat(test): Detect test utils callers and simplify helpers (#9707) 2021-04-26 16:15:03 +02:00
Michael Kriese 74d7691bef refactor: optimize type usage (#8947) 2021-03-02 21:44:55 +01:00
Michael Kriese 5a87c8b7e3 feat(presets): extract generic platform preset fetch (#6467) 2020-06-09 10:13:52 +02:00