@@ -216,14 +216,9 @@ describe('processAndPrunePieceInstanceTimings', () => {
216216 fromPreviousPart : true ,
217217 } )
218218 const shadow = ( enable : Piece [ 'enable' ] ) : PieceInstance => {
219- const instance = createPieceInstance ( 'shadow' , enable , 'one' , {
220- scope : 'part' ,
221- presence : 'forward-scope' ,
222- inShadow : 'stop' ,
223- } )
219+ const instance = createPieceInstance ( 'shadow' , enable , 'one' , partOnlyLifespan )
224220 return { ...instance , piece : { ...instance . piece , virtual : true , virtualMode : 'shadow' } }
225221 }
226- const rundownPersist : IPieceLifespan = { scope : 'rundown' , presence : 'forward-scope' , inShadow : 'persist' }
227222
228223 test ( 'an adlib taken before a shadow stays under it, wherever the playhead is' , ( ) => {
229224 const adlib = {
@@ -292,7 +287,7 @@ describe('processAndPrunePieceInstanceTimings', () => {
292287 test ( 'a legacy-persist piece is cut by a shadow, and resumes after it' , ( ) => {
293288 const resolvedInstances = runAndTidyResult (
294289 [
295- continuation ( 'incoming' , { ... rundownPersist , inShadow : 'legacy-persist' } ) ,
290+ continuation ( 'incoming' , LEGACY_PIECE_LIFESPAN_PRESETS [ LegacyPieceLifespan . OutOnRundownEnd ] ) ,
296291 shadow ( { start : 2000 , duration : 3000 } ) ,
297292 ] ,
298293 createPartCurrentTimes ( 500 , 0 )
@@ -348,8 +343,7 @@ describe('processAndPrunePieceInstanceTimings', () => {
348343
349344 test ( 'a clear virtual which does not end a persisting piece obstructs it while active, as a shadow' , ( ) => {
350345 const clear = createPieceInstance ( 'clear' , { start : 2000 , duration : 3000 } , 'one' , partOnlyLifespan , true )
351- const segmentPersist : IPieceLifespan = { scope : 'segment' , presence : 'forward-scope' , inShadow : 'persist' }
352- const legacyPersist : IPieceLifespan = { ...rundownPersist , inShadow : 'legacy-persist' }
346+ const legacyPersist = LEGACY_PIECE_LIFESPAN_PRESETS [ LegacyPieceLifespan . OutOnRundownEnd ]
353347
354348 expect (
355349 runAndTidyResult ( [ continuation ( 'incoming' , segmentPersist ) , clear ] , createPartCurrentTimes ( 500 , 0 ) )
0 commit comments