Skip to main content
Glama

Prisma MCP Server

Official
by prisma
Apache 2.0
4
44,192
  • Linux
  • Apple
Import.test.ts1.56 kB
import { expect, test } from 'vitest' import { moduleImport, namedImport } from './Import' import { stringify } from './stringify' test('module name only', () => { expect(stringify(moduleImport('someModule'))).toMatchInlineSnapshot(`"import "someModule""`) }) test('default', () => { const importDecl = moduleImport('myModule').default('mod') expect(stringify(importDecl)).toMatchInlineSnapshot(`"import mod from "myModule""`) }) test('namespace', () => { const importDecl = moduleImport('myModule').asNamespace('ns') expect(stringify(importDecl)).toMatchInlineSnapshot(`"import * as ns from "myModule""`) }) test('named', () => { const importDecl = moduleImport('myModule').named('func') expect(stringify(importDecl)).toMatchInlineSnapshot(`"import { func } from "myModule""`) }) test('named with alias', () => { const importDecl = moduleImport('myModule').named(namedImport('func').as('myFunc')) expect(stringify(importDecl)).toMatchInlineSnapshot(`"import { func as myFunc } from "myModule""`) }) test('multiple named', () => { const importDecl = moduleImport('myModule') .named('func1') .named('func2') .named(namedImport('func3').as('aliasedFunc3')) expect(stringify(importDecl)).toMatchInlineSnapshot( `"import { func1, func2, func3 as aliasedFunc3 } from "myModule""`, ) }) test('default and named', () => { const importDecl = moduleImport('myModule').default('mod').named('func1').named('func2') expect(stringify(importDecl)).toMatchInlineSnapshot(`"import mod, { func1, func2 } from "myModule""`) })

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