diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/system/DeltaProcessorTest.ts | 146 |
1 files changed, 0 insertions, 146 deletions
diff --git a/test/system/DeltaProcessorTest.ts b/test/system/DeltaProcessorTest.ts index 3998d68..07e288c 100644 --- a/test/system/DeltaProcessorTest.ts +++ b/test/system/DeltaProcessorTest.ts @@ -32,152 +32,6 @@ chai_use( require( 'chai-as-promised' ) ); describe( 'system.DeltaProcessor', () => { - describe( '#getTimestampSortedDeltas', () => - { - ( <{ label: string, given: any, expected: any }[]>[ - { - label: 'creates list', - given: { - rdelta: { - data: [ - { - data: { foo: [ 'first_bar' ] }, - timestamp: 123, - }, - { - data: { foo: [ 'second_bar' ] }, - timestamp: 234, - }, - ], - ratedata: [ - { - data: { foo: [ 'third_bar' ] }, - timestamp: 345, - }, - { - data: { foo: [ 'fourth_bar' ] }, - timestamp: 456, - }, - ] - } - }, - expected: [ - { - data: { foo: [ 'first_bar' ] }, - timestamp: 123, - type: 'data', - }, - { - data: { foo: [ 'second_bar' ] }, - timestamp: 234, - type: 'data', - }, - { - data: { foo: [ 'third_bar' ] }, - timestamp: 345, - type: 'ratedata', - }, - { - data: { foo: [ 'fourth_bar' ] }, - timestamp: 456, - type: 'ratedata', - }, - ], - }, - { - label: 'creates list with no ratedata', - given: { - rdelta: { - data: [ - { - data: { foo: [ 'first_bar' ] }, - timestamp: 123, - }, - { - data: { foo: [ 'second_bar' ] }, - timestamp: 234, - }, - ], - ratedata: [] - } - }, - expected: [ - { - data: { foo: [ 'first_bar' ] }, - timestamp: 123, - type: 'data', - }, - { - data: { foo: [ 'second_bar' ] }, - timestamp: 234, - type: 'data', - }, - ], - }, - { - label: 'creates list when rate occurs between two saves', - given: { - rdelta: { - data: [ - { - data: { foo: [ 'first_bar' ] }, - timestamp: 123, - }, - { - data: { foo: [ 'second_bar' ] }, - timestamp: 234, - }, - { - data: { foo: [ 'fourth_bar' ] }, - timestamp: 456, - }, - ], - ratedata: [ - { - data: { foo: [ 'third_bar' ] }, - timestamp: 345, - }, - ], - }, - }, - expected: [ - { - data: { foo: [ 'first_bar' ] }, - timestamp: 123, - type: 'data', - }, - { - data: { foo: [ 'second_bar' ] }, - timestamp: 234, - type: 'data', - }, - { - data: { foo: [ 'third_bar' ] }, - timestamp: 345, - type: 'ratedata', - }, - { - data: { foo: [ 'fourth_bar' ] }, - timestamp: 456, - type: 'data', - }, - ], - }, - ] ).forEach( ( { given, expected, label } ) => it( label, () => - { - const sut = new Sut( - createMockDeltaDao(), - createMockDeltaPublisher(), - new EventEmitter(), - ); - - const actual = sut.getTimestampSortedDeltas( given ); - - expect( actual ).to.deep.equal( expected ); - } ) ); - } ); - - describe( '#getDeltas', () => { ( <{ |