Commit Graph

36 Commits

Author SHA1 Message Date
Jamie Tanna d4614acc54 test(config/presets/github): cover that preset strings don't include a host
As part of recent changes to harden Host Rules, a test case was noticed
to be missing - we assume that a preset string doesn't include something
that looks like a host, but we didn't previously have a test to enforce
this.

This wasn't exploitable before our recent changes, but this test is here
to ensure we have a test covering this existing functionality.

Co-authored-by: Claude Fable 5 <jamie.tanna+claude-code@mend.io>
Co-authored-by: Claude Opus 5 <jamie.tanna+claude-code@mend.io>
2026-09-10 14:52:01 +01:00
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 ad0b59f8b7 refactor(oxlint): enable vitest/require-to-throw-message (#44421) 2026-07-07 17:47:04 +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 9d857c1f68 refactor(lint): Organize imports with biome (#40966) 2026-02-06 13:40:01 +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
Michael Kriese 19c115c813 test: cleanup (#34785) 2025-03-13 17:52:09 +00:00
Michael Kriese bb5377b3d8 test: fix code coverage (#34495) 2025-02-26 12:40:30 +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 84a97a62fa test(perf): improve test speed (#24323) 2023-09-08 11:40:04 +00:00
Oscar Dominguez e218379958 feat(presets): add support to presets ending with .json5 or .json (#15377)
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2022-05-02 16:34:09 +02:00
Michael Kriese ef470f7f92 feat(config): parse json files as json5 (#15187) 2022-04-29 08:34:55 +00:00
Michael Kriese 443bef5c52 test: cleanup snapshot tests (#15082) 2022-04-12 15:09:19 +01:00
Rhys Arkins 68a4415eb4 refactor(config): rename preset packageName/pkgName to repo (#14453) 2022-02-28 17:39:44 +01:00
Rhys Arkins b130bf5afb refactor: base64 util functions (#14422) 2022-02-26 10:16:54 +01:00
Michael Todorovic 7579875415 feat: support preset versioning with git tags (#11565)
Co-authored-by: Rhys Arkins <rhys@arkins.net>
Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
Co-authored-by: Sergei Zharinov <zharinov@users.noreply.github.com>
2021-11-05 13:12:47 +00:00
Sergei Zharinov 5f4b9f9a3a test: Fix test descriptions and enforce it via new linting rule (#11285) 2021-08-18 05:46:56 +00:00
Sergei Zharinov 2625858d59 refactor(config): Explicit asserts instead of lonely snapshots (#11174) 2021-08-09 10:21:51 +02:00
Sergei Zharinov 1392955a04 refactor: Identify tests relying on single snapshots (#11150)
Co-authored-by: Jamie Magee <jamie.magee@gmail.com>
2021-08-07 23:43:34 +00:00
Michael Kriese 3c7546f7cd test: simplify nock handling (#10170) 2021-05-27 14:13:31 +02:00
Sergei Zharinov ce51f05cef feat(test): Detect test utils callers and simplify helpers (#9707) 2021-04-26 16:15:03 +02:00
Sergei Zharinov df0ac4a78e refactor(presets): Reuse PRESET_INVALID_JSON variable (#9412)
Co-authored-by: Rhys Arkins <rhys@arkins.net>
2021-04-06 15:49:06 +02:00
Armaan Tobaccowalla e5c92e4cd9 feat(config): Support presets in subdirectories (#8724) 2021-03-20 23:03:10 +00:00
Rhys Arkins 00a08225b9 refactor: use ls-lint (#7956) 2020-12-11 13:29:43 +01:00
Rhys Arkins ae0fb696b4 refactor: github presets use util/http/github (#6658) 2020-07-03 07:27:00 +02:00
Rhys Arkins 4506497ea9 test: use 404/200 for github preset 2020-07-03 07:05:17 +02:00
Michael Kriese 5a87c8b7e3 feat(presets): extract generic platform preset fetch (#6467) 2020-06-09 10:13:52 +02:00
Michael Kriese 4d7c109a6b test: use nock for preset tests (#6449) 2020-06-07 13:00:49 +02:00
Rhys Arkins 0aae466cc1 fix(cache): global cache init (#6314) 2020-05-24 10:58:58 +02:00
Rhys Arkins 73694efd82 fix(cache): run cache init (#6312) 2020-05-24 07:13:55 +02:00
Rhys Arkins 7caac0987c chore: better runCache import 2020-05-12 19:21:14 +02:00
Rhys Arkins 6104c4637a refactor: global cache (#6198) 2020-05-11 10:38:07 +02:00
Rhys Arkins 04cba3f6c7 refactor(cache): rename run cache 2020-05-11 08:00:55 +02:00
Michael Kriese bf3527899c refactor(internal): refactor local presets (#6183) 2020-05-09 09:04:39 +02:00
Rhys Arkins 0c6935f8d0 refactor(presets): use subdirectories 2020-05-09 07:55:00 +02:00