@@ -108,8 +108,7 @@ describe( 'Channel', function() {
108108 done ( ) ;
109109 } ) ;
110110
111- const updateArgs = { id : '12345' , data : { content : 'Hola mundo!' } }
112- bucket . update ( updateArgs ) ;
111+ bucket . update ( '12345' , { content : 'Hola mundo!' } ) ;
113112 } ) ;
114113
115114 it ( 'should not send a change with an empty diff' , function ( done ) {
@@ -122,7 +121,7 @@ describe( 'Channel', function() {
122121 channel . once ( 'unmodified' , function ( ) {
123122 done ( ) ;
124123 } ) ;
125- bucket . update ( { id : 'thing' , data} ) ;
124+ bucket . update ( 'thing' , data ) ;
126125 } ) ;
127126 } ) ;
128127
@@ -137,16 +136,16 @@ describe( 'Channel', function() {
137136 channel . on ( 'send' , fn . counts ( 1 , checkSent ) ) ;
138137
139138 channel . on ( 'send' , function ( ) {
140- bucket . update ( { id, data : data2 } ) ;
139+ bucket . update ( id , data2 ) ;
141140 } )
142141
142+ const objectId = '123456' ;
143143 channel . localQueue . on ( 'wait' , function ( id ) {
144144 equal ( id , objectId ) ;
145145 done ( ) ;
146146 } ) ;
147147
148- const objectId = '123456' ;
149- bucket . update ( { id : objectId , data} ) ;
148+ bucket . update ( objectId , data ) ;
150149 } ) ;
151150
152151 it ( 'should acknowledge sent change' , function ( done ) {
@@ -161,7 +160,7 @@ describe( 'Channel', function() {
161160 acknowledge ( channel , msg ) ;
162161 } ) ;
163162
164- bucket . update ( { id : 'mock-id' , data } ) ;
163+ bucket . update ( 'mock-id' , data ) ;
165164 } ) ;
166165
167166 it ( 'should ignore duplicate change error if nothing to acknowledge' , ( done ) => {
@@ -228,12 +227,12 @@ describe( 'Channel', function() {
228227
229228 const id = '123' ;
230229 channel . once ( 'send' , function ( ) {
231- bucket . update ( { id, data : { title : 'hello again world' } } ) ;
230+ bucket . update ( id , { title : 'hello again world' } ) ;
232231 bucket . remove ( id ) ;
233232 } ) ;
234233
235234 store . put ( '123' , 3 , { title : 'hello world' } ) . then ( function ( ) {
236- bucket . update ( { id, data : { title : 'goodbye world' } } ) ;
235+ bucket . update ( id , { title : 'goodbye world' } ) ;
237236 } ) ;
238237 } ) ;
239238
@@ -268,7 +267,7 @@ describe( 'Channel', function() {
268267 } , reject ) ;
269268 } ) ;
270269
271- bucket . update ( { id : key , data : { title : 'hello world' } } , function ( ) {
270+ bucket . update ( key , { title : 'hello world' } , function ( ) {
272271 channel . handleMessage ( 'c:' + JSON . stringify ( [ {
273272 o : '-' , ev : 1 , cv : 'cv1' , id : key
274273 } ] ) ) ;
@@ -323,7 +322,7 @@ describe( 'Channel', function() {
323322
324323 const id = '123' ;
325324 store . put ( id , 3 , { title : 'hello world' } ) . then ( function ( ) {
326- bucket . update ( { id, data : { title : 'goodbye world!!' } } ) ;
325+ bucket . update ( id , { title : 'goodbye world!!' } ) ;
327326 } ) ;
328327 } ) ;
329328
@@ -355,7 +354,7 @@ describe( 'Channel', function() {
355354 } ] ) ) ;
356355
357356 // We're changing "Hello world" to "Goodbye world"
358- bucket . update ( { id : key , data : { title : 'Goodbye world' } } ) ;
357+ bucket . update ( key , { title : 'Goodbye world' } ) ;
359358 } ) ) ;
360359
361360 it ( 'should emit errors on the bucket instance' , ( done ) => {
@@ -429,7 +428,7 @@ describe( 'Channel', function() {
429428 acknowledge ( channel , msg ) ;
430429 } ) ;
431430
432- bucket . update ( { id : 'mock-id' , data} ) ;
431+ bucket . update ( 'mock-id' , data ) ;
433432 } ) ;
434433
435434 it ( 'should get version' , ( done ) => {
0 commit comments