فهرست منبع

Fixed a test case that broke when we upgraded sift.

Tony Ennis 11 سال پیش
والد
کامیت
51c7910581
1فایلهای تغییر یافته به همراه3 افزوده شده و 4 حذف شده
  1. 3 4
      test/lib/pipeline/Pipeline.js

+ 3 - 4
test/lib/pipeline/Pipeline.js

@@ -121,10 +121,9 @@ module.exports = {
 			},
 
 			"should call callback with errors from pipeline components": function (next) {
-				var p = Pipeline.parseCommand({pipeline:[{$match:{$foo:{bar:"baz"}}}]});
-				p.run(new DocumentSource({}), function(err, results){
-					assert(err instanceof Error);
-					return next();
+				// The $foo part is invalid and causes a throw.
+				assert.throws(function(){
+					Pipeline.parseCommand({pipeline:[{$match:{$foo:{bar:"baz"}}}]});
 				});
 			}