Skip to content

Commit 1fbfd35

Browse files
Fix lifecycle test
1 parent fbe3ccf commit 1fbfd35

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/testcontainers/src/generic-container/generic-container-lifecycle.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ describe.sequential("GenericContainer lifecycle", { timeout: 180_000 }, () => {
1919
});
2020

2121
it("should call lifecycle callbacks for a non-reused, generic container", async () => {
22-
await using container = await new CustomContainerWithCustomStartedContainer("cristianrgreco/testcontainer:1.1.14")
22+
const container = await new CustomContainerWithCustomStartedContainer("cristianrgreco/testcontainer:1.1.14")
2323
.withExposedPorts(8080)
2424
.start();
2525

@@ -28,6 +28,7 @@ describe.sequential("GenericContainer lifecycle", { timeout: 180_000 }, () => {
2828
expect(containerStarting).toHaveBeenCalledWith(false);
2929
expect(containerStarted).toHaveBeenCalledWith(false);
3030

31+
await container.stop();
3132
expect(containerStopping).toHaveBeenCalled();
3233
expect(containerStopped).toHaveBeenCalled();
3334
});

0 commit comments

Comments
 (0)