From 83136f64aad53aa70058ae3f59137f674535f488 Mon Sep 17 00:00:00 2001 From: Slava Kim Date: Tue, 10 Sep 2013 02:54:53 -0700 Subject: [PATCH] Add nested-nested test. Taken from Glasser's old code-review. --- packages/minimongo/minimongo_tests.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/minimongo/minimongo_tests.js b/packages/minimongo/minimongo_tests.js index 3c736df182..c55dbfa4b6 100644 --- a/packages/minimongo/minimongo_tests.js +++ b/packages/minimongo/minimongo_tests.js @@ -1116,6 +1116,12 @@ Tinytest.add("minimongo - fetch with projection, subarrays", function (test) { setA: [{fieldB:33}, {fieldB:"the bad",fieldC:"the ugly"}], setB: [{ anotherB: "meh" }, { anotherB: 431 }] }); + + c.remove({}); + c.insert({a:[[{b:1,c:2},{b:2,c:4}],{b:3,c:5},[{b:4, c:9}]]}); + + testForProjection({ 'a.b': 1, _id: 0 }, + {"a" : [ [ { "b" : 1 }, { "b" : 2 } ], { "b" : 3 }, [ { "b" : 4 } ] ] }); }); Tinytest.add("minimongo - observe ordered with projection", function (test) {