From a263c16a7ceb851ea96b205daefc805cc48aef81 Mon Sep 17 00:00:00 2001 From: denihs Date: Wed, 15 Feb 2023 14:10:39 -0400 Subject: [PATCH] - fix test: 'mongo-livedata - rewrite selector MONGO | STRING' --- packages/mongo/mongo_livedata_tests.js | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/packages/mongo/mongo_livedata_tests.js b/packages/mongo/mongo_livedata_tests.js index 9bff05a1b7..4459d56539 100644 --- a/packages/mongo/mongo_livedata_tests.js +++ b/packages/mongo/mongo_livedata_tests.js @@ -2769,27 +2769,23 @@ _.each( ['STRING', 'MONGO'], function(idGeneration) { }); // end idGeneration parametrization -Tinytest.add('mongo-livedata - rewrite selector', function (test) { - - test.equal(Mongo.Collection._rewriteSelector('foo'), - {_id: 'foo'}); - +Tinytest.add('mongo-livedata - rewrite selector', function(test) { + test.equal(Mongo.Collection._rewriteSelector('foo'), { _id: 'foo' }); var oid = new Mongo.ObjectID(); - test.equal(Mongo.Collection._rewriteSelector(oid), - {_id: oid}); + test.equal(Mongo.Collection._rewriteSelector(oid), { _id: oid }); test.matches( Mongo.Collection._rewriteSelector({ _id: null })._id, /^\S+$/, - 'Passing in a falsey selector _id should return a selector with a new ' - + 'auto-generated _id string' + 'Passing in a falsey selector _id should return a selector with a new ' + + 'auto-generated _id string' ); test.equal( Mongo.Collection._rewriteSelector({ _id: null }, { fallbackId: oid }), { _id: oid }, - 'Passing in a falsey selector _id and a fallback ID should return a ' - + 'selector with an _id using the fallback ID' + 'Passing in a falsey selector _id and a fallback ID should return a ' + + 'selector with an _id using the fallback ID' ); });