Skip to content

🎥 Make videos programmatically with React

fix(it-tests): restore Studio assertions and remove worker_threads warning

Igor Samokhovets9d5a655ccaec
diff --git a/packages/bundler/src/shared-bundler-config.ts b/packages/bundler/src/shared-bundler-config.ts
index e4f4e5ee9c..1b74eb0180 100644
--- a/packages/bundler/src/shared-bundler-config.ts
+++ b/packages/bundler/src/shared-bundler-config.ts
@@ -23,6 +23,9 @@ export const shouldUseReactDomClient =
export const getResolveConfig = () => ({
extensions: ['.ts', '.tsx', '.web.js', '.js', '.jsx', '.mjs', '.cjs'],
+ fallback: {
+ worker_threads: false as const,
+ },
alias: {
// Only one version of react
'react/jsx-runtime': require.resolve('react/jsx-runtime'),
diff --git a/packages/it-tests/src/bundle/studio.test.ts b/packages/it-tests/src/bundle/studio.test.ts
index 437f4cb268..1d135e2a38 100644
--- a/packages/it-tests/src/bundle/studio.test.ts
+++ b/packages/it-tests/src/bundle/studio.test.ts
@@ -7,6 +7,9 @@ test('Should be able to start the studio without zod installed', () => {
cwd: path.join(process.cwd(), '..', 'example-without-zod'),
}).toString('utf-8');
+ // Should not print warnings or errors
+ expect(res.length).toBeLessThan(200);
+
expect(res).toContain('Yes, the server started.');
});
@@ -14,6 +17,8 @@ test('Should be able to start the studio', () => {
const res = execSync('bunx remotion studio --test-for-server-open', {
cwd: path.join(process.cwd(), '..', 'example'),
}).toString('utf-8');
+ // Should not print warnings or errors
+ expect(res.length).toBeLessThan(200);
expect(res).toContain('Yes, the server started.');
});
diff --git a/packages/it-tests/src/rendering/rendering.test.ts b/packages/it-tests/src/rendering/rendering.test.ts
index ba0ba5a3e5..6f2f3ab6eb 100644
--- a/packages/it-tests/src/rendering/rendering.test.ts
+++ b/packages/it-tests/src/rendering/rendering.test.ts
@@ -411,9 +411,7 @@ test(
},
);
-const isMacOSCI = process.platform === 'darwin' && Boolean(process.env.CI);
-
-test.skipIf(isMacOSCI)(
+test(
'Should render a video with Offline Audio-context',
async () => {
const out = outputPath.replace('.mp4', '.mp3');
diff --git a/packages/web-renderer/bundle.ts b/packages/web-renderer/bundle.ts
index ed054fb537..19836d65a3 100644
--- a/packages/web-renderer/bundle.ts
+++ b/packages/web-renderer/bundle.ts
@@ -5,6 +5,12 @@ await buildPackage({
cjs: 'do-nothing',
esm: 'build',
},
- external: ['remotion', 'react', 'react-dom', 'mediabunny'],
+ external: [
+ 'remotion',
+ 'react',
+ 'react-dom',
+ 'mediabunny',
+ '@mediabunny/mp3-encoder',
+ ],
entrypoints: [{path: 'src/index.ts', target: 'browser'}],
});