From 20af16f4d146c477730dcf731da1c96aa43b5c4c Mon Sep 17 00:00:00 2001 From: Piyush <91911367+piyushmishra1416@users.noreply.github.com.> Date: Mon, 27 May 2024 13:17:53 +0530 Subject: [PATCH] removed unnecessary codes --- .env.test | 3 --- scripts/run-integration.sh | 3 +-- src/tests/helpers/setup.ts | 2 -- vitest.config.integration.ts | 8 -------- 4 files changed, 1 insertion(+), 15 deletions(-) diff --git a/.env.test b/.env.test index 1ae9e40da..6978ee21b 100644 --- a/.env.test +++ b/.env.test @@ -1,5 +1,2 @@ - -# DONT CHANGE FOR RUNNING WITH DOCKER -# DATABASE_URL="postgresql://postgres:postgres@db:5432/cms?schema=public" DATABASE_URL="postgresql://postgres:postgres@localhost:5432/cms?schema=public" diff --git a/scripts/run-integration.sh b/scripts/run-integration.sh index d123d26c7..6ef9b6f6c 100755 --- a/scripts/run-integration.sh +++ b/scripts/run-integration.sh @@ -1,4 +1,3 @@ -# docker compose up -d DIR="$(cd "$(dirname "$0")" && pwd)" export $(grep -v '^#' .env.test | xargs) docker run -d \ @@ -14,4 +13,4 @@ echo $DATABASE_URL npx prisma migrate dev --name init vitest -c ./vitest.config.integration.ts docker stop db && docker rm db -# docker compose down + diff --git a/src/tests/helpers/setup.ts b/src/tests/helpers/setup.ts index 6e2cab60c..27d27a283 100644 --- a/src/tests/helpers/setup.ts +++ b/src/tests/helpers/setup.ts @@ -1,8 +1,6 @@ import { PrismaClient } from '@prisma/client'; import '@testing-library/jest-dom'; import { beforeAll, beforeEach, afterAll, afterEach } from 'vitest'; -process.env.DATABASE_URL = - 'postgresql://postgres:postgres@localhost:5432/cms?schema=public'; const prisma = new PrismaClient(); diff --git a/vitest.config.integration.ts b/vitest.config.integration.ts index 408309f8e..1f846c8e7 100644 --- a/vitest.config.integration.ts +++ b/vitest.config.integration.ts @@ -1,13 +1,5 @@ -// vitest.config.integration.ts import { defineConfig } from 'vitest/config'; -import dotenv from 'dotenv'; - -dotenv.config({ path: './.env.test' }); - -process.env.DATABASE_URL = - 'postgresql://postgres:postgres@localhost:5432/cms?schema=public'; - export default defineConfig({ test: { globals: true,