diff --git a/packages/livedata/livedata_connection_tests.js b/packages/livedata/livedata_connection_tests.js index bf7c264cef..055303a541 100644 --- a/packages/livedata/livedata_connection_tests.js +++ b/packages/livedata/livedata_connection_tests.js @@ -917,7 +917,7 @@ Tinytest.add("livedata stub - multiple stubs same doc", function (test) { // Method sent. var updateMethodId = testGotMessage( test, stream, {msg: 'method', method: 'updateIt', - params: [{$type: 'oid', $value: stubWrittenId.valueOf()}], id: '*'}); + params: [stubWrittenId], id: '*'}); test.equal(stream.sent.length, 0); // Get some data... slightly different than what we wrote. diff --git a/packages/tinytest/tinytest.js b/packages/tinytest/tinytest.js index 3b3b51603c..30432f933b 100644 --- a/packages/tinytest/tinytest.js +++ b/packages/tinytest/tinytest.js @@ -205,7 +205,7 @@ _.extend(TestCaseResults.prototype, { include: function (s, v) { var pass = false; if (s instanceof Array) - pass = _.indexOf(s, v) !== -1; + pass = _.any(s, function(it) {return _.isEqual(v, it);}); else if (typeof s === "object") pass = v in s; else if (typeof s === "string") @@ -218,8 +218,9 @@ _.extend(TestCaseResults.prototype, { /* fail -- not something that contains other things */; if (pass) this.ok(); - else + else { this.fail({type: "include", sequence: s, should_contain_value: v}); + } }, // XXX should change to lengthOf to match vowsjs