| 
					
				 | 
			
			
				@@ -108,14 +108,14 @@ module.exports = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				}); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			"should swap $match and $sort if the $match immediately follows the $sort": function () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				var p = Pipeline.parseCommand({pipeline: [ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-					{$sort: {"xyz": 1}}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-					{$match: {}} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				]}); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				assert.equal(p.sources[0].constructor.matchName, "$match"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				assert.equal(p.sources[1].constructor.sortName, "$sort"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			// "should swap $match and $sort if the $match immediately follows the $sort": function () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			// 	var p = Pipeline.parseCommand({pipeline: [ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			// 		{$sort: {"xyz": 1}}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			// 		{$match: {}} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			// 	]}); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			// 	assert.equal(p.sources[0].constructor.matchName, "$match"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			// 	assert.equal(p.sources[1].constructor.sortName, "$sort"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			// }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			"should attempt to coalesce all sources": function () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				var p = Pipeline.parseCommand({pipeline: [ 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -157,8 +157,8 @@ module.exports = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			"should handle one unwind": function () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				var inputPipe = "[{$unwind: '$a'}]}", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-					expectedMergePipe = "[]}", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-					expectedShardPipe = "[{$unwind: '$a'}]}"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					expectedMergePipe = "[]", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					expectedShardPipe = "[{$unwind: '$a'}]"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				shardedTest(inputPipe, expectedMergePipe, expectedShardPipe); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 |