From c04a3e7179dd45dc0f42580670ecc50a9fa7b152 Mon Sep 17 00:00:00 2001 From: Wayne Dela Cruz Date: Thu, 1 Mar 2018 21:02:08 +0800 Subject: [PATCH] Add some tests --- types/mongodb/mongodb-tests.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/types/mongodb/mongodb-tests.ts b/types/mongodb/mongodb-tests.ts index 36428d786f..852522aadc 100644 --- a/types/mongodb/mongodb-tests.ts +++ b/types/mongodb/mongodb-tests.ts @@ -98,4 +98,19 @@ MongoClient.connect('mongodb://127.0.0.1:27017/test', options, function (err: mo type payment = typeof payment; let cursor: mongodb.AggregationCursor = collection.aggregate([{}]) } + + // test for new typings + { + type TestCollection = { + stringField: string; + numberField: number; + }; + let testCollection = db.collection('testCollection'); + + testCollection.find({ + numberField: { + $and: [{ $gt: 0, $lt: 100 }] + } + }); + } })