Skip to content

Commit 20af16f

Browse files
removed unnecessary codes
1 parent 9785b09 commit 20af16f

File tree

4 files changed

+1
-15
lines changed

4 files changed

+1
-15
lines changed

.env.test

-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,2 @@
1-
2-
# DONT CHANGE FOR RUNNING WITH DOCKER
3-
# DATABASE_URL="postgresql://postgres:postgres@db:5432/cms?schema=public"
41
DATABASE_URL="postgresql://postgres:postgres@localhost:5432/cms?schema=public"
52

scripts/run-integration.sh

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# docker compose up -d
21
DIR="$(cd "$(dirname "$0")" && pwd)"
32
export $(grep -v '^#' .env.test | xargs)
43
docker run -d \
@@ -14,4 +13,4 @@ echo $DATABASE_URL
1413
npx prisma migrate dev --name init
1514
vitest -c ./vitest.config.integration.ts
1615
docker stop db && docker rm db
17-
# docker compose down
16+

src/tests/helpers/setup.ts

-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import { PrismaClient } from '@prisma/client';
22
import '@testing-library/jest-dom';
33
import { beforeAll, beforeEach, afterAll, afterEach } from 'vitest';
4-
process.env.DATABASE_URL =
5-
'postgresql://postgres:postgres@localhost:5432/cms?schema=public';
64

75
const prisma = new PrismaClient();
86

vitest.config.integration.ts

-8
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
1-
// vitest.config.integration.ts
21
import { defineConfig } from 'vitest/config';
32

4-
import dotenv from 'dotenv';
5-
6-
dotenv.config({ path: './.env.test' });
7-
8-
process.env.DATABASE_URL =
9-
'postgresql://postgres:postgres@localhost:5432/cms?schema=public';
10-
113
export default defineConfig({
124
test: {
135
globals: true,

0 commit comments

Comments
 (0)