From 4d35fe77fec445c3606adf383967ba1ddfcbdb56 Mon Sep 17 00:00:00 2001 From: eug-vs Date: Wed, 2 Dec 2020 04:22:37 +0300 Subject: test: drop collection after test case --- test/event.model.test.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/event.model.test.ts b/test/event.model.test.ts index 05afb7a..0ca3166 100644 --- a/test/event.model.test.ts +++ b/test/event.model.test.ts @@ -1,7 +1,12 @@ import { expect } from 'chai'; import Model from './model'; +import connection from './utils/dbConnection'; describe('Event model', () => { + after(async () => { + connection.dropCollection('customevents'); + }); + it('Should assign status and nextRunAt on creation', async () => { const event = await Model.create({ type: 'test', -- cgit v1.2.3