Procházet zdrojové kódy

EAGLESIX-3087: Iron out some more test cases

Jason Walton před 11 roky
rodič
revize
e78cac1dfa

+ 1 - 0
lib/pipeline/Pipeline.js

@@ -301,6 +301,7 @@ klass.parseDocumentSources = function parseDocumentSources(pipeline, ctx){
 		if (!desc) throw new Error("Unrecognized pipeline stage name: '" + stageName + "'; code 16436");
 
 		// Parse the stage
+		debugger
 		var stage = desc(stageSpec, ctx);
 		if (!stage) throw new Error("Stage must not be undefined!"); // verify(stage)
 		sources.push(stage);

+ 1 - 1
lib/pipeline/documentSources/SortDocumentSource.js

@@ -399,7 +399,7 @@ proto.serializeSortKey = function serializeSortKey(explain) {
 klass.createFromJson = function createFromJson(elem, expCtx) {
 	if (typeof elem !== "object") throw new Error("code 15973; the " + klass.sortName + " key specification must be an object");
 
-	return this.create(expCtx, elem);
+	return class.create(expCtx, elem);
 };
 
 /**

+ 0 - 10
test/lib/pipeline/Pipeline.js

@@ -192,16 +192,6 @@ module.exports = {
 						{$foo: {bar: "baz"}}
 					]});
 				});
-			},
-
-			"should call callback with errors from pipeline components": function (next) {
-				var p = Pipeline.parseCommand({pipeline: [
-					{$foo: {bar: "baz"}}
-				]});
-				p.run(new DocumentSource({}), function (err, results) {
-					assert(err instanceof Error);
-					return next();
-				});
 			}
 
 		},