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
|
- uses: actions/checkout@v4
|
||||||
- name: Install docker
|
- name: Install docker
|
||||||
uses: papodaca/install-docker-action@main
|
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: |
|
run: |
|
||||||
npm install
|
npm install
|
||||||
npm run test
|
npm run test
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,8 @@ export let db = new Kysely<Database>({
|
||||||
dialect,
|
dialect,
|
||||||
})
|
})
|
||||||
|
|
||||||
export function resetDbInstance() {
|
export async function resetDbInstance() {
|
||||||
|
await db.destroy()
|
||||||
db = new Kysely<Database>({
|
db = new Kysely<Database>({
|
||||||
dialect,
|
dialect,
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -34,8 +34,8 @@ jest.mock("./settings", () => ({
|
||||||
}))
|
}))
|
||||||
|
|
||||||
describe("subscriptions", () => {
|
describe("subscriptions", () => {
|
||||||
beforeAll(() => {
|
beforeAll(async () => {
|
||||||
resetDbInstance()
|
await resetDbInstance()
|
||||||
})
|
})
|
||||||
|
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue