chore: attach mongoMemoryServer to db and destroy in tests (#5326)

* chore: attach mongoMemoryServer to db and destroy in tests

* bump mongodb-memory-server to 9.x

---------

Co-authored-by: Paul Popus <paul@nouance.io>
This commit is contained in:
Dan Ribbens
2024-03-14 15:41:20 -04:00
committed by GitHub
parent cbfc7c8b43
commit d193c677c7
36 changed files with 254 additions and 133 deletions

View File

@@ -12,6 +12,12 @@ describe('Custom GraphQL', () => {
restClient = new NextRESTClient(payload.config)
})
afterAll(async () => {
if (typeof payload.db.destroy === 'function') {
await payload.db.destroy()
}
})
describe('Isolated Transaction ID', () => {
it('should isolate transaction IDs between queries in the same request', async () => {
const query = `query {