From 95e4cad3c64ece9bea85de35cb217315a71dabc7 Mon Sep 17 00:00:00 2001 From: David Glasser Date: Fri, 28 Feb 2014 20:54:25 -0800 Subject: [PATCH] Failing test-case for a sort bug --- packages/minimongo/minimongo_tests.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/minimongo/minimongo_tests.js b/packages/minimongo/minimongo_tests.js index c635c8a0b8..1a1d1f325f 100644 --- a/packages/minimongo/minimongo_tests.js +++ b/packages/minimongo/minimongo_tests.js @@ -1693,7 +1693,13 @@ Tinytest.add("minimongo - ordering", function (test) { {a: [5, [3, 19], 18]} ]); - + // (0,4) < (0,5), so they go in this order. It's not correct to consider + // (0,3) as a sort key for the second document because they come from + // different a-branches. + verify({'a.x': 1, 'a.y': 1}, [ + {a: [{x: 0, y: 4}]}, + {a: [{x: 0, y: 5}, {x: 1, y: 3}]} + ]); }); Tinytest.add("minimongo - sort", function (test) {