1
0
Fork 0
mirror of synced 2024-09-21 20:01:32 +12:00
budibase/packages/server/src/tests/globalTeardown.ts

13 lines
418 B
TypeScript
Raw Normal View History

2024-03-23 06:04:45 +13:00
import { getContainerRuntimeClient } from "testcontainers"
export default async function teardown() {
const client = await getContainerRuntimeClient()
// @ts-expect-error
// eslint-disable-next-line no-undef
const containerId = globalThis.__COUCHDB_CONTAINER_ID__
const container = client.container.getById(containerId)
await client.container.stop(container)
await client.container.remove(container)
}