Skip to content

🎥 Make videos programmatically with React

Update series.test.tsx to cover nested fragments

Rob Jacksonda66eae2c2bc
diff --git a/packages/core/src/test/series.test.tsx b/packages/core/src/test/series.test.tsx
index 6c1a541d3e..823104209d 100644
--- a/packages/core/src/test/series.test.tsx
+++ b/packages/core/src/test/series.test.tsx
@@ -26,6 +26,11 @@ const Third = () => {
return <div>{'third ' + frame}</div>;
};
+const Fourth = () => {
+ const frame = useCurrentFrame();
+ return <div>{'fourth ' + frame}</div>;
+};
+
const renderForFrame = (frame: number, markup: React.ReactNode) => {
return renderToString(
<CanUseRemotionHooksProvider>
@@ -84,9 +89,14 @@ test('Should support fragments', () => {
<Series.Sequence key="0" durationInFrames={5}>
<Second />
</Series.Sequence>
- <Series.Sequence key="1" durationInFrames={5}>
- <Third />
- </Series.Sequence>
+ <>
+ <Series.Sequence key="1" durationInFrames={5}>
+ <Third />
+ </Series.Sequence>
+ <Series.Sequence key="2" durationInFrames={5}>
+ <Fourth />
+ </Series.Sequence>
+ </>
</>
</Series>
</WrapSequenceContext>