refactor: Cập nhật cấu hình PrismaClient trong môi trường kiểm thử để sử dụng biến môi trường DATABASE_URL.
This commit is contained in:
@@ -29,9 +29,9 @@ export async function setupTestDatabase() {
|
||||
}
|
||||
|
||||
// Initialize Prisma client with test database
|
||||
prisma = new PrismaClient({
|
||||
datasourceUrl: TEST_DATABASE_URL,
|
||||
});
|
||||
// Set DATABASE_URL for test database
|
||||
process.env.DATABASE_URL = TEST_DATABASE_URL;
|
||||
prisma = new PrismaClient();
|
||||
|
||||
// Connect to database
|
||||
await prisma.$connect();
|
||||
|
||||
Reference in New Issue
Block a user