From dc405ef3b76296f2eb2b6a1130a98fd4e889a978 Mon Sep 17 00:00:00 2001 From: Mark Wubben Date: Mon, 1 Nov 2021 13:09:51 +0100 Subject: [PATCH] Fix Mongoose recipe --- docs/recipes/endpoint-testing-with-mongoose.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/recipes/endpoint-testing-with-mongoose.md b/docs/recipes/endpoint-testing-with-mongoose.md index 5ee0d5842..dc2d1c40b 100644 --- a/docs/recipes/endpoint-testing-with-mongoose.md +++ b/docs/recipes/endpoint-testing-with-mongoose.md @@ -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()); }); ``` @@ -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(); +}); ```