deno.land / x / mongoose@6.7.5 / test / util.js

نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
'use strict';
/** * Generates a random string */
exports.random = function() { return Math.random().toString().substring(3);};
exports.clearTestData = function clearTestData(db) { return db.dropDatabase();};
exports.stopRemainingOps = function stopRemainingOps(db) { // Make all future operations on currently defined models hang // forever. Since the collection gets deleted, should get // garbage collected. for (const name of Object.keys(db.models)) { const model = db.models[name]; model.collection.buffer = true; }};
mongoose

Version Info

Tagged at
a year ago