Commit graph

6 commits

Author SHA1 Message Date
Florent BENOIT
1bc01dc186
refactor(mock): generate @podman-desktop/api mock from its definition (#15670)
* refactor(mock): generate @podman-desktop/api mock from its definition

instead of writing for each function and for each namespace the content
reuse the .d.ts definition and wire automatically vi.fn()

customize/override some classes implementation manually but most of it is generated

fixes https://github.com/podman-desktop/podman-desktop/issues/14493

Signed-off-by: Florent Benoit <fbenoit@redhat.com>
2026-01-30 14:45:47 +01:00
axel7083
a7ec719e22
chore(vitest): update import path for product.json in __mocks__ directory (#15554)
Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com>
2026-01-05 17:31:37 +00:00
Florent Benoit
8d8587086a chore: mock env.appName for extension unit tests
Signed-off-by: Florent Benoit <fbenoit@redhat.com>
2025-12-03 17:00:09 +01:00
Florent Benoit
b8d2bbdd71 chore: populate global mock of the extension API
it will allow to avoid per test mocking for global declaration

related to https://github.com/podman-desktop/podman-desktop/issues/14493
Signed-off-by: Florent Benoit <fbenoit@redhat.com>
2025-11-18 12:17:28 +01:00
Florent Benoit
a8b73b5ab0 feat(extension-api): rename '@tmpwip/extension-api' by '@podman-desktop/api';
the namespace was temporary but now that we have external extensions that
should build upon it, make it using a good external name
fixes https://github.com/containers/podman-desktop/issues/1625

Change-Id: I70c7ea1c6a00de791133505366ce9bf47ce11704
Signed-off-by: Florent Benoit <fbenoit@redhat.com>
2023-03-08 10:37:27 +01:00
Florent BENOIT
fe38b75a09
chore: add mocking module for the extension API (#954)
THis module is only a runtime module so we need to fake the resolution for vitest

Change-Id: Ibcd1b23c6fe263a57de59f66dc240a9cd959e278
Signed-off-by: Florent Benoit <fbenoit@redhat.com>

Signed-off-by: Florent Benoit <fbenoit@redhat.com>
2022-12-05 08:53:57 -05:00