Skip to main content
Glama

Prisma MCP Server

Official
by prisma
Apache 2.0
4
44,192
  • Linux
  • Apple
MigrateCommand.test.ts1.2 kB
import { MigrateCommand } from '../commands/MigrateCommand' import { createDefaultTestContext } from './__helpers__/context' const ctx = createDefaultTestContext() it('no params should return help', async () => { const commandInstance = MigrateCommand.new({}) const spy = jest.spyOn(commandInstance, 'help').mockImplementation(() => 'Help Me') await commandInstance.parse([], await ctx.config()) expect(spy).toHaveBeenCalledTimes(1) spy.mockRestore() }) it('wrong flag', async () => { const commandInstance = MigrateCommand.new({}) const spy = jest.spyOn(commandInstance, 'help').mockImplementation(() => 'Help Me') await commandInstance.parse(['--something'], await ctx.config()) expect(spy).toHaveBeenCalledTimes(1) spy.mockRestore() }) it('help flag', async () => { const commandInstance = MigrateCommand.new({}) const spy = jest.spyOn(commandInstance, 'help').mockImplementation(() => 'Help Me') await commandInstance.parse(['--help'], await ctx.config()) expect(spy).toHaveBeenCalledTimes(1) spy.mockRestore() }) it('unknown command', async () => { await expect(MigrateCommand.new({}).parse(['doesnotexist'], await ctx.config())).resolves.toThrow() })

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