From 4ae691e8edc87d0e3cfb633bb91c328426be007b Mon Sep 17 00:00:00 2001 From: Jonathan Abrahams Date: Wed, 9 Mar 2016 12:17:50 -0500 Subject: SERVER-22468 Format JS code with approved style in jstests/ --- jstests/core/mr_errorhandling.js | 43 ++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 21 deletions(-) (limited to 'jstests/core/mr_errorhandling.js') diff --git a/jstests/core/mr_errorhandling.js b/jstests/core/mr_errorhandling.js index 1bd94bbd56e..280d6e76891 100644 --- a/jstests/core/mr_errorhandling.js +++ b/jstests/core/mr_errorhandling.js @@ -2,48 +2,49 @@ t = db.mr_errorhandling; t.drop(); -t.save( { a : [ 1 , 2 , 3 ] } ); -t.save( { a : [ 2 , 3 , 4 ] } ); +t.save({a: [1, 2, 3]}); +t.save({a: [2, 3, 4]}); -m_good = function(){ - for ( var i=0; i= 0 , "B3" ); +assert.isnull(res, "B1"); +assert(theerror, "B2"); +assert(theerror.indexOf("emit") >= 0, "B3"); // test things are still in an ok state -res = t.mapReduce( m_good , r , "mr_errorhandling_out" ); -assert.eq( { 1 : 1 , 2 : 2 , 3 : 2 , 4 : 1 } , res.convertToSingleObject() , "A" ); +res = t.mapReduce(m_good, r, "mr_errorhandling_out"); +assert.eq({1: 1, 2: 2, 3: 2, 4: 1}, res.convertToSingleObject(), "A"); res.drop(); -assert.throws( function(){ t.mapReduce( m_good , r , { out : "xxx" , query : "foo" } ); } ); +assert.throws(function() { + t.mapReduce(m_good, r, {out: "xxx", query: "foo"}); +}); -- cgit v1.2.1