Skip to content

🎥 Make videos programmatically with React

@remotion/studio: Stabilize optional package test

JonnyBurgera729ca652475
diff --git a/packages/studio/src/test/whisper-webgpu-capability.test.tsx b/packages/studio/src/test/whisper-webgpu-capability.test.tsx
index 1083f219f9..a5fd478a6b 100644
--- a/packages/studio/src/test/whisper-webgpu-capability.test.tsx
+++ b/packages/studio/src/test/whisper-webgpu-capability.test.tsx
@@ -120,12 +120,15 @@ test('opens transcription after installing Whisper without restarting', async ()
expect(getComputedStyle(installing).fontSize).toBe('14px');
expect(getComputedStyle(installing).lineHeight).toBe('1.5');
resolveInstall(new Response(JSON.stringify({success: true, data: {}})));
- await waitFor(() => {
- expect(window.remotion_installedPackages).toContain(
- WHISPER_WEBGPU_PACKAGE,
- );
- expect(container.textContent).toContain('Output in public/');
- });
+ await waitFor(
+ () => {
+ expect(window.remotion_installedPackages).toContain(
+ WHISPER_WEBGPU_PACKAGE,
+ );
+ expect(container.textContent).toContain('Output in public/');
+ },
+ {timeout: 5000},
+ );
expect(fetchSpy).toHaveBeenCalledTimes(1);
const requestInit = fetchSpy.mock.calls[0]?.[1];
expect(JSON.parse(String(requestInit?.body))).toEqual({