Skip to content

Commit

Permalink
removed unnecessary codes
Browse files Browse the repository at this point in the history
  • Loading branch information
piyushmishra1416 committed May 27, 2024
1 parent 9785b09 commit 20af16f
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 15 deletions.
3 changes: 0 additions & 3 deletions .env.test
Original file line number Diff line number Diff line change
@@ -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"

3 changes: 1 addition & 2 deletions scripts/run-integration.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# docker compose up -d
DIR="$(cd "$(dirname "$0")" && pwd)"
export $(grep -v '^#' .env.test | xargs)
docker run -d \
Expand All @@ -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

2 changes: 0 additions & 2 deletions src/tests/helpers/setup.ts
Original file line number Diff line number Diff line change
@@ -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();

Expand Down
8 changes: 0 additions & 8 deletions vitest.config.integration.ts
Original file line number Diff line number Diff line change
@@ -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,
Expand Down

0 comments on commit 20af16f

Please sign in to comment.