22 Commits

Author SHA1 Message Date
Michael Kriese 9e354ff18b ci: fail tests that read the repository config.js (#46999)
Write a canary config.js before the unit tests, and fail any test that
imports it, so tests can't depend on a config.js in the working
directory again.

Co-authored-by: Claude Opus 5.5 <michael.kriese+claude-code@mend.io>
2026-10-19 08:18:23 +00:00
Jamie Tanna a2704ed3f1 test: always clear hostRules after each test (#46582)
Instead of needing to always make sure that we've cleared host rules in
tests that use them - or knowing when they're touched indirectly - we
can make sure that we have an `afterEach` that will clear our Host
Rules.

We can do this by making sure that we have a top-level `afterEach` that
handles this, which needs a dynamic import to avoid eagerly importing
and caching it, which would leave stale unmocked bindings for a given
file's test run.

We also need to make sure that `private-key.spec.ts`'s `sanitize.ts`
mock is updated to also stub `clearRepoSanitizedSecretsList`, since
`hostRules.clear()` now calls.

Co-authored-by: Claude Sonnet 5 <jamie.tanna+claude-code@mend.io>
2026-09-30 11:22:18 +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
Sergei Zharinov 558bdc159d feat: Cleanup mutexes before each run (#38987)
* feat: Cleanup mutexes before each run

* Update setup.ts

* Update mutex.spec.ts

* Update setup.ts

* Unmock mutex in deb datasource spec to prevent race condition

* Update index.spec.ts
2025-11-15 21:24:43 +00:00
Michael Kriese 19c115c813 test: cleanup (#34785) 2025-03-13 17:52:09 +00:00
Michael Kriese 4f60a8b7fe test: mock git globally (#34783) 2025-03-13 15:48:02 +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 0300c4e0a4 test(logger): Fix mock for withMeta function (#33979) 2025-01-31 20:36:38 +00:00
Michael Kriese 84a97a62fa test(perf): improve test speed (#24323) 2023-09-08 11:40:04 +00:00
Rhys Arkins 36e2b328bb chore: update types reference 2023-08-15 11:31:15 +02:00
renovate[bot] fe739befbf chore(deps): update linters to v6 (major) (#23325)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2023-08-02 15:07:49 +00:00
renovate[bot] 81eb17aaca chore(deps): update linters (#23120)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Rhys Arkins <rhys@arkins.net>
2023-07-04 09:19:17 +00:00
Sergei Zharinov 96ca7a3bd7 chore: Bump signal-exit in lockfile to fix error logging (#22775) 2023-06-14 17:28:46 +00:00
Sergei Zharinov a5c6d0a5cd test: Suppres distracting reuse global emitter error message (#22774) 2023-06-14 18:56:07 +02:00
Markus Schulz dd6c8e5147 feat: Move some Git commands behind a PlatformScm interface (#19327)
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2023-02-22 08:18:53 +00:00
Sergei Zharinov 49cdaf2ac2 feat: Support for logging once per repo (#20168) 2023-02-03 07:00:58 +00:00
renovate[bot] 582f77371c chore(deps): update jest monorepo (#17737)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2022-09-12 16:58:52 +02:00
Rhys Arkins dca3418bbd refactor: lib/modules (#14488)
Moves datasource, manager, platform and versioning code from lib/ into new lib/modules/

BREAKING CHANGE: External tools must update paths to datasource, manager, platform and versioning
2022-03-04 09:04:02 +01:00
Michael Kriese f405350105 test: fix regression (#12347) 2021-10-27 08:22:02 +02:00
Oleg Krivtsov 29dde2f694 test: improve test readability with expect-more-jest (#12329) 2021-10-27 07:24:36 +02:00
Michael Kriese 4437106c03 test: add http mock (#11290) 2021-08-16 20:07:36 +02:00
Michael Kriese 48bfb1c182 test: fix memory leak (#10162) 2021-05-26 10:47:05 +02:00