You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: readme.md
+19Lines changed: 19 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -103,6 +103,25 @@ module.exports = {
103
103
};
104
104
```
105
105
106
+
To use mongo as a replica set you must add the `replSet` config object and set
107
+
`count` and `storageEngine` fields:
108
+
109
+
```js
110
+
module.exports= {
111
+
mongodbMemoryServerOptions: {
112
+
binary: {
113
+
skipMD5:true,
114
+
},
115
+
autoStart:false,
116
+
instance: {},
117
+
replSet: {
118
+
count:3,
119
+
storageEngine:'wiredTiger',
120
+
},
121
+
},
122
+
};
123
+
```
124
+
106
125
### 3. Configure MongoDB client
107
126
108
127
Library sets the `process.env.MONGO_URL` for your convenience, but using of `global.__MONGO_URI__` is preferable as it works with ` useSharedDBForAllJestWorkers: false`
0 commit comments