Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

test(web): type GIF media setter callbacks

Akshar Patela029f43eaf99
diff --git a/apps/web/__tests__/unit/media-format-converter.test.ts b/apps/web/__tests__/unit/media-format-converter.test.ts
index 8f19dbe90..ee9df77a3 100644
--- a/apps/web/__tests__/unit/media-format-converter.test.ts
+++ b/apps/web/__tests__/unit/media-format-converter.test.ts
@@ -127,7 +127,7 @@ it.each([
duration,
);
vi.spyOn(HTMLMediaElement.prototype, "src", "set").mockImplementation(
- function () {
+ function (this: HTMLMediaElement) {
queueMicrotask(() => this.dispatchEvent(new Event("loadedmetadata")));
},
);
@@ -135,7 +135,7 @@ it.each([
HTMLMediaElement.prototype,
"currentTime",
"set",
- ).mockImplementation(function () {
+ ).mockImplementation(function (this: HTMLMediaElement) {
queueMicrotask(() => this.dispatchEvent(new Event("seeked")));
});
vi.spyOn(HTMLMediaElement.prototype, "play").mockResolvedValue();