Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Commit

Permalink
Tests: Added missing tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
scofalik committed Dec 28, 2017
1 parent c57548c commit f33f579
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/model/batch.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,21 @@ describe( 'Batch', () => {

expect( batch.baseVersion ).to.be.null;
} );

it( 'should return null if all deltas in batch have base version set to null', () => {
const batch = new Batch();

const deltaA = new Delta();
deltaA.addOperation( new Operation( null ) );

const deltaB = new Delta();
deltaB.addOperation( new Operation( null ) );

batch.addDelta( deltaA );
batch.addDelta( deltaB );

expect( batch.baseVersion ).to.equal( null );
} );
} );

describe( 'addDelta()', () => {
Expand Down

0 comments on commit f33f579

Please sign in to comment.