From 0b9c5a049a3653186555d24d3ee312d50a57cee0 Mon Sep 17 00:00:00 2001 From: Maxime Cannoodt Date: Sat, 9 Jul 2022 13:24:25 +0200 Subject: [PATCH] remove test db before tests, not after --- server/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/package.json b/server/package.json index 03e6fc1..acd7f03 100644 --- a/server/package.json +++ b/server/package.json @@ -7,10 +7,10 @@ "test-watch": "vitest", "test": "vitest run unit", "test:unit": "vitest run unit", - "test:integration": "run-s db:test:migrate test:integration:test db:test:cleanup", + "test:integration": "run-s db:test:cleanup db:test:migrate test:integration:test", "test:integration:test": "dotenv -e .env.test -- vitest run --coverage --no-threads", "db:test:migrate": "dotenv -e .env.test -- npx prisma db push", - "db:test:cleanup": "rm ./prisma/test.sqlite", + "db:test:cleanup": "rm -f ./prisma/test.sqlite", "coverage": "vitest run --coverage", "build": "npx tsc", "dev": "npx nodemon ./server.ts | npx pino-colada"