@@ -264,7 +264,7 @@ test('Setting an array and pushing changes', function(t) {
264264
265265
266266test ( 'Pushing an item' , function ( t ) {
267- var actionExpected = { one :{ "~DOP" :[ [ 4 , 0 , 7 ] ] } } ;
267+ var actionExpected = { one :{ "~DOP" :[ [ 1 , 4 , 0 , 7 ] ] } } ;
268268 var mutationsExpected = 1 ;
269269
270270 var collector = dop . collect ( ) ;
@@ -278,7 +278,7 @@ test('Pushing an item', function(t) {
278278
279279
280280test ( 'Setting an item of array' , function ( t ) {
281- var actionExpected = { one :{ "~DOP" :[ [ 1 , 1 , 'DOS' ] ] } } ;
281+ var actionExpected = { one :{ "~DOP" :[ [ 1 , 1 , 1 , 'DOS' ] ] } } ;
282282 var mutationsExpected = 1 ;
283283
284284 var collector = dop . collect ( ) ;
@@ -290,7 +290,7 @@ test('Setting an item of array', function(t) {
290290
291291
292292test ( 'Setting a subobject into an array' , function ( t ) {
293- var actionExpected = { "one" :{ "2" :{ "~DOP" :[ [ 2 , 1 , { } ] ] } } } ;
293+ var actionExpected = { "one" :{ "2" :{ "~DOP" :[ [ 1 , 2 , 1 , { } ] ] } } } ;
294294 var mutationsExpected = 1 ;
295295
296296 var collector = dop . collect ( ) ;
@@ -325,7 +325,7 @@ test('Setting a property of a subobject that is into an array', function(t) {
325325
326326
327327test ( 'Pushing an item of a subarray that is into an array' , function ( t ) {
328- var actionExpected = { "one" :{ "2" :{ "2" :{ "array" :{ "~DOP" :[ [ 1 , 0 , "xD" ] ] } } } } } ;
328+ var actionExpected = { "one" :{ "2" :{ "2" :{ "array" :{ "~DOP" :[ [ 1 , 1 , 0 , "xD" ] ] } } } } } ;
329329 var mutationsExpected = 1 ;
330330
331331 var collector = dop . collect ( ) ;
@@ -349,7 +349,7 @@ test('Setting a array internaly', function(t) {
349349
350350
351351test ( 'Pushing items and changing properties internaly' , function ( t ) {
352- var actionExpected = { one :{ 3 :{ 2 :{ array :{ "~DOP" :[ [ 2 , 1 , "juas" ] , [ 3 , 0 , "omg" ] ] } } } , "~DOP" :[ [ 5 , 0 , "omg" ] , [ 0 , - 5 , 1 , 4 , 2 , 3 ] ] } , two :undefined } ;
352+ var actionExpected = { one :{ 3 :{ 2 :{ array :{ "~DOP" :[ [ 1 , 2 , 1 , "juas" ] , [ 1 , 3 , 0 , "omg" ] ] } } } , "~DOP" :[ [ 1 , 5 , 0 , "omg" ] , [ 0 , 0 , 5 , 1 , 4 , 2 , 3 ] ] } , two :undefined } ;
353353 var mutationsExpected = 5 ;
354354
355355 var collector = dop . collect ( ) ;
@@ -374,7 +374,7 @@ test('Pushing items and changing properties internaly', function(t) {
374374
375375
376376test ( 'Setting a property literaly' , function ( t ) {
377- var actionExpected = { "~DOP" :[ [ 0 , 1 , "testing" ] ] } ;
377+ var actionExpected = { "~DOP" :[ [ 1 , 0 , 1 , "testing" ] ] } ;
378378 var mutationsExpected = 1 ;
379379
380380 var collector = dop . collect ( ) ;
@@ -386,7 +386,7 @@ test('Setting a property literaly', function(t) {
386386
387387
388388test ( 'Pushing a property' , function ( t ) {
389- var actionExpected = { "~DOP" :[ [ 1 , 0 , "second" ] ] } ;
389+ var actionExpected = { "~DOP" :[ [ 1 , 1 , 0 , "second" ] ] } ;
390390 var mutationsExpected = 1 ;
391391
392392 var collector = dop . collect ( ) ;
@@ -397,7 +397,7 @@ test('Pushing a property', function(t) {
397397} ) ;
398398
399399test ( 'Adding a subobject' , function ( t ) {
400- var actionExpected = { "~DOP" :[ [ 2 , 0 , { "obj" :123 } ] ] } ;
400+ var actionExpected = { "~DOP" :[ [ 1 , 2 , 0 , { "obj" :123 } ] ] } ;
401401 var mutationsExpected = 1 ;
402402
403403 var collector = dop . collect ( ) ;
@@ -409,7 +409,7 @@ test('Adding a subobject', function(t) {
409409
410410
411411test ( 'Shift and editing subobject' , function ( t ) {
412- var actionExpected = { "1" :{ "prop" :456 } , "~DOP" :[ [ 0 , 1 ] ] } ;
412+ var actionExpected = { "1" :{ "prop" :456 } , "~DOP" :[ [ 1 , 0 , 1 ] ] } ;
413413 var mutationsExpected = 2 ;
414414
415415 var collector = dop . collect ( ) ;
@@ -423,7 +423,7 @@ test('Shift and editing subobject', function(t) {
423423
424424
425425test ( 'Pushing literal arrays' , function ( t ) {
426- var actionExpected = { "1" :{ "prop" :[ "my" , "array" ] } , "~DOP" :[ [ 2 , 0 , [ 7 , 8 , [ 9 , 10 ] ] , 11 ] , [ 0 , 1 , "first" ] ] } ;
426+ var actionExpected = { "1" :{ "prop" :[ "my" , "array" ] } , "~DOP" :[ [ 1 , 2 , 0 , [ 7 , 8 , [ 9 , 10 ] ] , 11 ] , [ 1 , 0 , 1 , "first" ] ] } ;
427427 var mutationsExpected = 3 ;
428428
429429 var collector = dop . collect ( ) ;
0 commit comments