File tree Expand file tree Collapse file tree 1 file changed +12
-8
lines changed
src/json-crdt/model/__tests__ Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -28,10 +28,12 @@ test('can set map schema', () => {
2828} ) ;
2929
3030test ( 'uses global session ID by default' , ( ) => {
31- const model = Model . withLogicalClock ( ) . setSchema ( s . obj ( {
32- id : s . str < string > ( 'asdf' ) ,
33- num : s . con ( 123 ) ,
34- } ) ) ;
31+ const model = Model . withLogicalClock ( ) . setSchema (
32+ s . obj ( {
33+ id : s . str < string > ( 'asdf' ) ,
34+ num : s . con ( 123 ) ,
35+ } ) ,
36+ ) ;
3537 expect ( model . api . r . get ( ) . node . id . sid ) . toBe ( SESSION . GLOBAL ) ;
3638 expect ( model . api . r . get ( ) . get ( 'id' ) . node . id . sid ) . toBe ( SESSION . GLOBAL ) ;
3739 expect ( model . api . r . get ( ) . get ( 'num' ) . node . id . sid ) . toBe ( SESSION . GLOBAL ) ;
@@ -49,10 +51,12 @@ test('allows to specify custom session ID', () => {
4951} ) ;
5052
5153test ( 'resets session ID to user specified' , ( ) => {
52- const model = Model . withLogicalClock ( ) . setSchema ( s . obj ( {
53- id : s . str < string > ( 'asdf' ) ,
54- num : s . con ( 123 ) ,
55- } ) ) ;
54+ const model = Model . withLogicalClock ( ) . setSchema (
55+ s . obj ( {
56+ id : s . str < string > ( 'asdf' ) ,
57+ num : s . con ( 123 ) ,
58+ } ) ,
59+ ) ;
5660 expect ( model . view ( ) . num ) . toBe ( 123 ) ;
5761 expect ( model . api . r . get ( ) . get ( 'num' ) . node . id . sid ) . toBe ( SESSION . GLOBAL ) ;
5862 model . api . r . get ( ) . set ( {
You can’t perform that action at this time.
0 commit comments