Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion backend/src/tests/db-connection.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import { PrismaClient } from '@prisma/client';
import * as dotenv from 'dotenv';

// Load environment variables
dotenv.config();

describe('Database Connection', () => {
let prisma: PrismaClient;
Expand All @@ -13,7 +17,7 @@ describe('Database Connection', () => {

it('should connect to the database successfully', async () => {
if (!process.env.DATABASE_URL) {
// Remove console.log and use return to skip test
console.warn('DATABASE_URL not found, skipping test');
return;
}

Expand Down
Loading