@@ -21,9 +21,8 @@ describe('test.mapreduce.js-upsert', function () {
2121 it ( 'should fulfill if the diff returns false' , async function ( ) {
2222 const res = await upsert ( {
2323 get : ( ) => Promise . resolve ( { _rev : 'xyz' } ) ,
24- } , 'foo' , function ( ) {
25- return false ;
26- } ) ;
24+ } , 'foo' , ( ) => false
25+ ) ;
2726
2827 res . updated . should . equal ( false ) ;
2928 res . rev . should . equal ( 'xyz' ) ;
@@ -33,9 +32,8 @@ describe('test.mapreduce.js-upsert', function () {
3332 const res = await upsert ( {
3433 get : ( ) => Promise . reject ( { status : 404 } ) ,
3534 put : ( ) => Promise . resolve ( { rev : 'abc' } ) ,
36- } , 'foo' , function ( ) {
37- return { difference : "something" } ;
38- } ) ;
35+ } , 'foo' , ( ) => ( { difference : "something" } )
36+ ) ;
3937
4038 res . updated . should . equal ( true ) ;
4139 res . rev . should . equal ( 'abc' ) ;
@@ -46,9 +44,8 @@ describe('test.mapreduce.js-upsert', function () {
4644 await upsert ( {
4745 get : ( ) => Promise . resolve ( { _rev : 'xyz' } ) ,
4846 put : ( ) => Promise . reject ( new Error ( 'falala' ) ) ,
49- } , 'foo' , function ( ) {
50- return { difference : "something" } ;
51- } ) ;
47+ } , 'foo' , ( ) => ( { difference : "something" } )
48+ ) ;
5249
5350 should . fail ( "Expected promise to be rejected" ) ;
5451 } catch ( err ) {
0 commit comments