Destroy old db instance during subscription test when resetting db instance
Test / test (push) Has been cancelled
Details
Test / test (push) Has been cancelled
Details
This commit is contained in:
parent
20e7099317
commit
206ce42655
|
|
@ -10,7 +10,8 @@ jobs:
|
|||
- uses: actions/checkout@v4
|
||||
- name: Install docker
|
||||
uses: papodaca/install-docker-action@main
|
||||
- env: NODE_OPTIONS=--max-old-space-size=8192
|
||||
- name: Run Tests
|
||||
env: NODE_OPTIONS=--max-old-space-size=8192
|
||||
run: |
|
||||
npm install
|
||||
npm run test
|
||||
|
|
|
|||
|
|
@ -20,7 +20,8 @@ export let db = new Kysely<Database>({
|
|||
dialect,
|
||||
})
|
||||
|
||||
export function resetDbInstance() {
|
||||
export async function resetDbInstance() {
|
||||
await db.destroy()
|
||||
db = new Kysely<Database>({
|
||||
dialect,
|
||||
})
|
||||
|
|
|
|||
|
|
@ -34,8 +34,8 @@ jest.mock("./settings", () => ({
|
|||
}))
|
||||
|
||||
describe("subscriptions", () => {
|
||||
beforeAll(() => {
|
||||
resetDbInstance()
|
||||
beforeAll(async () => {
|
||||
await resetDbInstance()
|
||||
})
|
||||
|
||||
beforeEach(async () => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue