Skip to main content
Glama

Prisma MCP Server

Official
by prisma
Apache 2.0
4
44,192
  • Linux
  • Apple
lazyProperty.test.ts818 B
import { expect, test, vi } from 'vitest' import { lazyProperty } from './lazyProperty' test('returns callback value', () => { const prop = lazyProperty(vi.fn().mockReturnValue(123)) expect(prop.get()).toBe(123) }) test('computes property only once', () => { const compute = vi.fn().mockReturnValue(123) const prop = lazyProperty(compute) prop.get() prop.get() expect(compute).toHaveBeenCalledTimes(1) }) test('caches undefined values', () => { const compute = vi.fn().mockReturnValue(undefined) const prop = lazyProperty(compute) prop.get() prop.get() expect(compute).toHaveBeenCalledTimes(1) }) test('caches null values', () => { const compute = vi.fn().mockReturnValue(null) const prop = lazyProperty(compute) prop.get() prop.get() expect(compute).toHaveBeenCalledTimes(1) })

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