Skip to content

Enhanced ChatGPT Clone: Features Agents, MCP, Skills, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, Code Interpreter, langchain, DALL-E-3, OpenAPI Actions, Functions, Secure Multi-User Auth, Presets, open-source for self-hosting. Active

691 B
Raw Blame
import { MongoMemoryServer } from 'mongodb-memory-server';
import { describeTenantIsolationConformance } from './conformance';
import { createMongooseTenantHarness } from './harness';

/**
 * The Mongoose binding's answer to the portable contract. A PostgreSQL engine
 * satisfies the same suite by supplying its own harness — that is what makes
 * the seam real rather than hypothetical.
 */

let server: MongoMemoryServer;

describeTenantIsolationConformance(
  createMongooseTenantHarness({
    name: 'mongoose',
    async connect() {
      server = await MongoMemoryServer.create();
      return server.getUri();
    },
    async release() {
      await server.stop();
    },
  }),
);