Skip to content

Commit c672a53

Browse files
committed
test(ddd-toolkit): integration tests drop collections after tests to ensure clean state
1 parent 2b1ecb9 commit c672a53

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

packages/ddd-toolkit/src/repo/tests/mongo-aggregate-repo-with-outbox.integration-spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ describe('MongoAggregateRepo MongoDB Integration', () => {
5151

5252
afterAll(async () => {
5353
await outbox.terminate();
54+
await mongoClient.db().collection(collectionName).drop();
5455
await mongoClient.close();
5556
await mongodb.stop();
5657
});

packages/ddd-toolkit/src/repo/tests/mongo-aggregate-repo.integration-spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ describe('MongoAggregateRepo MongoDB Integration', () => {
3838
});
3939

4040
afterAll(async () => {
41+
await mongoClient.db().collection(collectionName).drop();
4142
await mongoClient.close();
4243
await mongodb.stop();
4344
});

0 commit comments

Comments
 (0)