@@ -239,7 +239,13 @@ class LocalStoreTester {
239
239
toContain ( doc : MaybeDocument ) : LocalStoreTester {
240
240
this . promiseChain = this . promiseChain . then ( ( ) => {
241
241
return this . localStore . readDocument ( doc . key ) . then ( result => {
242
- expectEqual ( result , doc ) ;
242
+ expectEqual (
243
+ result ,
244
+ doc ,
245
+ `Expected ${
246
+ result ? result . toString ( ) : null
247
+ } to match ${ doc . toString ( ) } .`
248
+ ) ;
243
249
} ) ;
244
250
} ) ;
245
251
return this ;
@@ -759,15 +765,15 @@ function genericLocalStoreTests(
759
765
expectLocalStore ( )
760
766
. afterAllocatingQuery ( query )
761
767
. toReturnTargetId ( 2 )
762
- . after ( docAddedRemoteEvent ( doc ( 'foo/bar' , 0 , { foo : 'old' } ) , [ 2 ] ) )
768
+ . after ( docAddedRemoteEvent ( doc ( 'foo/bar' , 1 , { foo : 'old' } ) , [ 2 ] ) )
763
769
. after ( patchMutation ( 'foo/bar' , { foo : 'bar' } ) )
764
770
// Release the query so that our target count goes back to 0 and we are considered
765
771
// up-to-date.
766
772
. afterReleasingQuery ( query )
767
773
. after ( setMutation ( 'foo/bah' , { foo : 'bah' } ) )
768
774
. after ( deleteMutation ( 'foo/baz' ) )
769
775
. toContain (
770
- doc ( 'foo/bar' , 0 , { foo : 'bar' } , { hasLocalMutations : true } )
776
+ doc ( 'foo/bar' , 1 , { foo : 'bar' } , { hasLocalMutations : true } )
771
777
)
772
778
. toContain (
773
779
doc ( 'foo/bah' , 0 , { foo : 'bah' } , { hasLocalMutations : true } )
@@ -800,15 +806,15 @@ function genericLocalStoreTests(
800
806
expectLocalStore ( )
801
807
. afterAllocatingQuery ( query )
802
808
. toReturnTargetId ( 2 )
803
- . after ( docAddedRemoteEvent ( doc ( 'foo/bar' , 0 , { foo : 'old' } ) , [ 2 ] ) )
809
+ . after ( docAddedRemoteEvent ( doc ( 'foo/bar' , 1 , { foo : 'old' } ) , [ 2 ] ) )
804
810
. after ( patchMutation ( 'foo/bar' , { foo : 'bar' } ) )
805
811
// Release the query so that our target count goes back to 0 and we are considered
806
812
// up-to-date.
807
813
. afterReleasingQuery ( query )
808
814
. after ( setMutation ( 'foo/bah' , { foo : 'bah' } ) )
809
815
. after ( deleteMutation ( 'foo/baz' ) )
810
816
. toContain (
811
- doc ( 'foo/bar' , 0 , { foo : 'bar' } , { hasLocalMutations : true } )
817
+ doc ( 'foo/bar' , 1 , { foo : 'bar' } , { hasLocalMutations : true } )
812
818
)
813
819
. toContain (
814
820
doc ( 'foo/bah' , 0 , { foo : 'bah' } , { hasLocalMutations : true } )
0 commit comments