Files
mongo/jstests/core/error2.js
Randolph Tan 5595b94560 SERVER-12127 migrate js tests to jscore suite when not related to writes
Moved test jstest/[a-i].js -> jstests/core/ and made changes to comply with write command api
2014-02-28 16:26:33 -05:00

22 lines
313 B
JavaScript

// Test that client gets stack trace on failed invoke
f = db.jstests_error2;
f.drop();
f.save( {a:1} );
assert.throws(
function(){
c = f.find({$where : function(){ return a() }});
c.next();
}
);
assert.throws(
function(){
db.eval( function() { return a(); } );
}
);