Skip to content

🎥 Make videos programmatically with React

timeline order test (failing)

Jonny Burger17b5d0baaf2c
diff --git a/packages/cli/src/test/timeline.test.ts b/packages/cli/src/test/timeline.test.ts
index f8ec901db8..8e3960a49b 100644
--- a/packages/cli/src/test/timeline.test.ts
+++ b/packages/cli/src/test/timeline.test.ts
@@ -54,3 +54,59 @@ test('Should calculate a basic timline', () => {
},
]);
});
+
+test('Should follow order of nesting', () => {
+ const calculated = calculateTimeline({
+ sequences: [
+ {
+ displayName: 'Audio',
+ duration: 100,
+ from: 0,
+ id: '0.2',
+ parent: '0.1',
+ rootId: '0.1',
+ showInTimeline: true,
+ type: 'sequence',
+ },
+ {
+ displayName: 'Audio',
+ duration: 100,
+ from: 0,
+ id: '0.1',
+ parent: null,
+ rootId: '0.1',
+ showInTimeline: true,
+ type: 'sequence',
+ },
+ ],
+ sequenceDuration: 100,
+ });
+ expect(calculated).toEqual([
+ {
+ depth: 0,
+ sequence: {
+ displayName: 'Audio',
+ duration: 100,
+ from: 0,
+ id: '0.1',
+ parent: null,
+ rootId: '0.1',
+ showInTimeline: true,
+ type: 'sequence',
+ },
+ },
+ {
+ depth: 1,
+ sequence: {
+ displayName: 'Audio',
+ duration: 100,
+ from: 0,
+ id: '0.2',
+ parent: '0.1',
+ rootId: '0.1',
+ showInTimeline: true,
+ type: 'sequence',
+ },
+ },
+ ]);
+});