mono/packages/vfs-ex/tests/services/database.test.ts
2025-09-15 22:51:05 +02:00

15 lines
429 B
TypeScript

import { beforeAll, describe, expect, it } from 'bun:test';
import { prisma } from '../../src/services/database';
describe('Database tests', () => {
beforeAll(async () => {
// Ensure the database is connected before running tests
await prisma.$connect();
});
it('should connect to the database', async () => {
const users = await prisma.user.findMany();
expect(Array.isArray(users)).toBe(true);
});
});