1
0
Fork 0
mirror of synced 2024-10-04 03:54:37 +13:00
budibase/globalTeardown.ts
2024-03-26 09:49:33 +00:00

12 lines
418 B
TypeScript

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)
}