Skip to content

🎥 Make videos programmatically with React

Remove duplicate artifacts SSR test and fixture

Jonny Burger0037444ccfec
diff --git a/packages/it-tests/src/ssr/duplicate-artifacts.test.ts b/packages/it-tests/src/ssr/duplicate-artifacts.test.ts
deleted file mode 100644
index 55b86012b8..0000000000
--- a/packages/it-tests/src/ssr/duplicate-artifacts.test.ts
+++ /dev/null
@@ -1,46 +0,0 @@
-import {expect, test} from 'bun:test';
-import {mkdtempSync, rmSync} from 'node:fs';
-import {tmpdir} from 'node:os';
-import path from 'node:path';
-import {bundle} from '@remotion/bundler';
-import {openBrowser, renderMedia, selectComposition} from '@remotion/renderer';
-
-test(
- 'renderMedia() rejects two artifacts with the same filename on the same frame',
- async () => {
- const directory = mkdtempSync(path.join(tmpdir(), 'duplicate-artifacts-'));
- const browser = await openBrowser('chrome');
- try {
- const serveUrl = await bundle({
- entryPoint: path.join(__dirname, 'fixtures', 'duplicate-artifacts.tsx'),
- outDir: path.join(directory, 'bundle'),
- enableCaching: false,
- });
- const composition = await selectComposition({
- serveUrl,
- id: 'duplicate-artifacts',
- puppeteerInstance: browser,
- });
- const emitted: string[] = [];
-
- await expect(
- renderMedia({
- composition,
- serveUrl,
- codec: 'h264',
- outputLocation: path.join(directory, 'out.mp4'),
- puppeteerInstance: browser,
- logLevel: 'error',
- onArtifact: (artifact) => {
- emitted.push(artifact.filename);
- },
- }),
- ).rejects.toThrow(/Artifacts must have unique names/);
- expect(emitted).toEqual(['captions.srt']);
- } finally {
- await browser.close({silent: true});
- rmSync(directory, {recursive: true, force: true});
- }
- },
- {timeout: 60000},
-);
diff --git a/packages/it-tests/src/ssr/fixtures/duplicate-artifacts.tsx b/packages/it-tests/src/ssr/fixtures/duplicate-artifacts.tsx
deleted file mode 100644
index e11c21dbfb..0000000000
--- a/packages/it-tests/src/ssr/fixtures/duplicate-artifacts.tsx
+++ /dev/null
@@ -1,26 +0,0 @@
-import {Artifact, Composition, registerRoot, useCurrentFrame} from 'remotion';
-
-const DuplicateArtifacts = () => {
- const frame = useCurrentFrame();
- if (frame !== 0) {
- return null;
- }
-
- return (
- <>
- <Artifact filename="captions.srt" content="first" />
- <Artifact filename="captions.srt" content="second" />
- </>
- );
-};
-
-registerRoot(() => (
- <Composition
- id="duplicate-artifacts"
- component={DuplicateArtifacts}
- fps={30}
- width={16}
- height={16}
- durationInFrames={2}
- />
-));