Skip to main content
Glama

Prisma MCP Server

Official
by prisma
Apache 2.0
4
44,231
  • Linux
  • Apple
tests.ts1.72 kB
import { NewPrismaClient } from '../../_utils/types' import { defaultTestSuiteOptions } from '../_utils/test-suite-options' import testMatrix from './_matrix' // @ts-ignore import { PrismaClient } from './generated/prisma/client' declare const newPrismaClient: NewPrismaClient<PrismaClient, typeof PrismaClient> testMatrix.setupTestSuite(({ clientRuntime, engineType }, _suiteMeta, clientMeta) => { test('does not throw without the adapter property', () => { expect(() => newPrismaClient()).not.toThrow() }) // TODO: Fails with PrismaClientValidationError: Invalid client engine type, please use `library` or `binary` skipTestIf( clientRuntime === 'wasm-engine-edge' || clientRuntime === 'wasm-compiler-edge' || clientRuntime === 'client', )('does not throw if adapter is set to null', async () => { const prisma = newPrismaClient({ adapter: null }) if (!clientMeta.driverAdapter) { await prisma.user.findMany() } }) skipTestIf(engineType === 'client')('throws if adapter is explicitly set to undefined', () => { expect(() => newPrismaClient({ adapter: undefined })).toThrowErrorMatchingInlineSnapshot(` ""adapter" property must not be undefined, use null to conditionally disable driver adapters. Read more at https://pris.ly/d/client-constructor" `) }) skipTestIf(engineType !== 'client')('throws if adapter is explicitly set to undefined', () => { expect(() => newPrismaClient({ adapter: undefined })).toThrowErrorMatchingInlineSnapshot(` "Using engine type "client" requires a driver adapter to be provided to PrismaClient constructor. Read more at https://pris.ly/d/client-constructor" `) }) }, defaultTestSuiteOptions)

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/prisma/prisma'

If you have feedback or need assistance with the MCP directory API, please join our Discord server