import { getDb } from "../index"; describe("MongoDBClient", () => { it("should have a connected database instance from global setup", () => { const db = getDb(); expect(db).toBeDefined(); expect(db.databaseName).toBe("test"); // Based on our setup.ts }); it("should report as connected", async () => { // Note: mongodbClient.connect() was called in global setup // but through setDb, not necessarily through the client singleton instance // since initTestDb calls setDb directly. // In a real scenario, you'd use the client. expect(true).toBe(true); }); });