Add some tests

This commit is contained in:
Wayne Dela Cruz
2018-03-01 21:02:08 +08:00
parent e3a0c63975
commit c04a3e7179

View File

@@ -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<payment> = collection.aggregate<payment>([{}])
}
// test for new typings
{
type TestCollection = {
stringField: string;
numberField: number;
};
let testCollection = db.collection<TestCollection>('testCollection');
testCollection.find({
numberField: {
$and: [{ $gt: 0, $lt: 100 }]
}
});
}
})