We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c53e378 commit ec61bd5Copy full SHA for ec61bd5
src/__mocks__/mongooseCommon.js
@@ -1,6 +1,10 @@
1
import mongoose, { Schema } from 'mongoose';
2
3
-const dbName = 'gqc-mongoose-test';
+function getRandomInt(min, max) {
4
+ return Math.floor(Math.random() * (max - min)) + min;
5
+}
6
+
7
+const dbName = `gqc-mongoose-test${getRandomInt(1, 1000000)}`;
8
const uri = `mongodb://127.0.0.1:27017/${dbName}`;
9
10
mongoose.Promise = Promise;
0 commit comments