Skip to content

Commit 383e4a3

Browse files
committed
Disconnect arranger in BackofficeCourseRepository tests after tests execution
1 parent d20e087 commit 383e4a3

File tree

3 files changed

+76
-79
lines changed

3 files changed

+76
-79
lines changed

package-lock.json

Lines changed: 70 additions & 78 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
"nunjucks": "^3.2.3",
5656
"pg": "^8.7.1",
5757
"ts-node": "^10.8.1",
58-
"typeorm": "^0.2.37",
58+
"typeorm": "^0.3.10",
5959
"typescript": "^4.2.3",
6060
"uuid": "^8.3.2",
6161
"uuid-validate": "0.0.3",

tests/Contexts/Backoffice/Courses/infrastructure/BackofficeCourseRepository.test.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ afterEach(async () => {
1616
await (await environmentArranger).arrange();
1717
});
1818

19+
afterAll(async () => {
20+
await (await environmentArranger).close();
21+
});
22+
1923
describe('BackofficeCourseRepository', () => {
2024
describe('#save', () => {
2125
it('should be able to persist the same course twice', async () => {
@@ -66,6 +70,7 @@ describe('#searchByCriteria', () => {
6670
BackofficeCourseMother.random()
6771
];
6872
await Promise.all(courses.map(async course => repository.save(course)));
73+
6974
const result = await repository.matching(
7075
BackofficeCourseCriteriaMother.nameAndDurationContainsSortAscById('DDD', 'days')
7176
);

0 commit comments

Comments
 (0)