Browse Source

refs #1004: Found some missed bugs from previous commit after an svn update.

http://source.rd.rcg.local/trac/eagle6/changeset/1361/Eagle6_SVN
Jared Hall 12 years ago
parent
commit
76af5b8163
2 changed files with 4 additions and 5 deletions
  1. 2 2
      lib/pipeline/PipelineD.js
  2. 2 3
      test/lib/munge.js

+ 2 - 2
lib/pipeline/PipelineD.js

@@ -36,7 +36,7 @@ var PipelineD = module.exports = (function(){
 
 		//TODO: should this go earlier in the execution so that we dont need to do it every time?
         var projection = {};
-        var deps = {};
+        var deps = [];
         var status = DocumentSource.GetDepsReturn.SEE_NEXT;
         for (var i=0; i < sources.length && status == DocumentSource.GetDepsReturn.SEE_NEXT; i++) {
             status = sources[i].getDependencies(deps);
@@ -59,4 +59,4 @@ var PipelineD = module.exports = (function(){
 	};
 
 	return klass;
-})();
+})();

+ 2 - 3
test/lib/munge.js

@@ -102,10 +102,9 @@ module.exports = {
 				e = [{_id:0, e:1, b:"not two", a:2}, {_id:2, e:2, b:"two", a:4}, {_id:4, e:3, b:"not two", a:6}],
 				munger = munge(p),
 				a = munger(i);
-			assert.equal(JSON.stringify(a), JSON.stringify(e), "Unexpected value!");
 			assert.deepEqual(a, e, "Unexpected value (not deepEqual)!");
-			assert.equal(JSON.stringify(munger(i)), JSON.stringify(e), "Reuse of munger should yield the same results!");
-			assert.equal(JSON.stringify(munge(p, i)), JSON.stringify(e), "Alternate use of munge should yield the same results!");
+			assert.deepEqual(munger(i), e, "Reuse of munger should yield the same results!");
+			assert.deepEqual(munge(p, i), e, "Alternate use of munge should yield the same results!");
 		},
 
 		"should be able to construct an instance with $sort operators properly (ascending)": function(){