Skip to content

Commit

Permalink
Fix Mongoose recipe
Browse files Browse the repository at this point in the history
  • Loading branch information
novemberborn committed Nov 1, 2021
1 parent c214512 commit dc405ef
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions docs/recipes/endpoint-testing-with-mongoose.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ test.before(async t => {
// First start MongoDB instance
t.context.mongod = await MongoMemoryServer.create();
// And connect
await mongoose.connect(mongod.getUri());
await mongoose.connect(t.context.mongod.getUri());
});
```

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

```js
test.after.always(async () => {
await mongoose.disconnect()
await t.context.mongod.stop()
})
test.after.always(async t => {
await mongoose.disconnect();
await t.context.mongod.stop();
});

```

Expand Down

0 comments on commit dc405ef

Please sign in to comment.