import { TRANSFORM_STATE } from '../../../../../../common/constants' ; import mockTransformListRow from '../../../../common/__mocks__/transform_list_row.json' ; import { TransformListRow , isCompletedBatchTransform } from '../../../../common' ; describe ( 'Transform: isCompletedBatchTransform()' , ( ) => { test ( 'isCompletedBatchTransform()' , ( ) => { const row = mockTransformListRow as TransformListRow ; expect ( row . stats . checkpointing . last . checkpoint === 1 ) . toBe ( true ) ; expect ( row . config . sync === undefined ) . toBe ( true ) ; expect ( row . stats . state === TRANSFORM_STATE . STOPPED ) . toBe ( true ) ; expect ( isCompletedBatchTransform ( row ) ) . toBe ( true ) ; row . stats . checkpointing . last . checkpoint = 0 ; expect ( isCompletedBatchTransform ( row ) ) . toBe ( false ) ; } ) ; } ) ;