From e84b1eb14558c1848316c47c692bc2b3cfdbc98c Mon Sep 17 00:00:00 2001 From: Ari Lazier Date: Mon, 21 Mar 2016 13:41:00 -0700 Subject: [PATCH] fix for test bug in test harness for queries that should throw --- tests/js/query-tests.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/js/query-tests.js b/tests/js/query-tests.js index df0fb503..c4cc4d57 100644 --- a/tests/js/query-tests.js +++ b/tests/js/query-tests.js @@ -102,9 +102,11 @@ function runQuerySuite(suite) { })); } else if (test[0] == "QueryThrows") { + var type = test[1]; + var args = getArgs(2); + var objects = realm.objects(type); TestCase.assertThrows(function() { - var args = getArgs(2); - realm.objects.apply(realm, args); + objects.filtered.apply(objects, args); }, "Expected exception not thrown for query: " + JSON.stringify(args)); } else if (test[0] != "Disabled") {