jstests/concurrency/fsm_workloads/update_replace.js
// explicitly pass db to avoid accidentally using the global `db`
explicitly pass db to avoid accidentally using the global `db`
explicitly pass db to avoid accidentally using the global ` db `
function assertResult(db, res) {
        assertAlways.eq(0, res.nUpserted, tojson(res));
        assertWhenOwnColl.eq(1, res.nMatched,  tojson(res));
        if (db.getMongo().writeMode() === 'commands') {
            assertWhenOwnColl.contains(res.nModified, [0, 1], tojson(res));
        }
    }
function assertResult ( db , res ) { assertAlways . eq ( 0 , res . nUpserted , tojson ( res ) ) ; assertWhenOwnColl . eq ( 1 , res . nMatched , tojson ( res ) ) ; if ( db . getMongo ( ) . writeMode ( ) === 'commands' ) { assertWhenOwnColl . contains ( res . nModified , [ 0 , 1 ] , tojson ( res ) ) ; } }
explicitly pass db to avoid accidentally using the global `db`
explicitly pass db to avoid accidentally using the global ` db `