Skip to content

Commit dc405ef

Browse files
committed
Fix Mongoose recipe
1 parent c214512 commit dc405ef

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

docs/recipes/endpoint-testing-with-mongoose.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ test.before(async t => {
5656
// First start MongoDB instance
5757
t.context.mongod = await MongoMemoryServer.create();
5858
// And connect
59-
await mongoose.connect(mongod.getUri());
59+
await mongoose.connect(t.context.mongod.getUri());
6060
});
6161
```
6262

@@ -115,10 +115,10 @@ test.serial('litmus create user', async t => {
115115
Finally disconnect from and stop MongoDB when all tests are done:
116116

117117
```js
118-
test.after.always(async () => {
119-
await mongoose.disconnect()
120-
await t.context.mongod.stop()
121-
})
118+
test.after.always(async t => {
119+
await mongoose.disconnect();
120+
await t.context.mongod.stop();
121+
});
122122

123123
```
124124

0 commit comments

Comments
 (0)