Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
docs: add connection.close() and remove escape hatch --forceExit
  • Loading branch information
vladholubiev committed Feb 15, 2018
commit 513a6fbad495d6c72de65ede00c5c787718a4724
4 changes: 1 addition & 3 deletions docs/MongoDB.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ beforeAll(async () => {
});

afterAll(async () => {
await connection.close();
await db.close();
});

Expand Down Expand Up @@ -119,8 +120,5 @@ it('should aggregate docs from collection', async () => {
});
```

Note: you may need to modify test script to run jest sequentially, like that:
`jest --runInBand --forceExit`.

Here's the code of
[full working example](https://github.com/vladgolubev/jest-mongodb).