Skip to main content
Glama

Prisma MCP Server

Official
by prisma
Apache 2.0
4
44,192
  • Linux
  • Apple
strictEnum.test.ts1.36 kB
import { makeStrictEnum } from './strictEnum' const StrictEnum = makeStrictEnum({ ONE: '1', TWO: '2', THREE: '3', }) test('individual values', () => { expect(StrictEnum.ONE).toBe('1') expect(StrictEnum.TWO).toBe('2') expect(StrictEnum.THREE).toBe('3') }) test('throws on undefined value', () => { expect(() => (StrictEnum as any).NOT_THERE).toThrowErrorMatchingInlineSnapshot(`"Invalid enum value: NOT_THERE"`) }) test('keys', () => { expect(Object.keys(StrictEnum)).toEqual(['ONE', 'TWO', 'THREE']) }) test('values', () => { expect(Object.values(StrictEnum)).toEqual(['1', '2', '3']) }) test('in', () => { expect('ONE' in StrictEnum).toBe(true) expect('NotThere' in StrictEnum).toEqual(false) }) test('hasOwnProperty', () => { expect(Object.prototype.hasOwnProperty.call(StrictEnum, 'ONE')).toBe(true) expect(Object.prototype.hasOwnProperty.call(StrictEnum, 'NotThere')).toBe(false) }) test('JSON.stringify', () => { expect(JSON.stringify(StrictEnum)).toMatchInlineSnapshot(`"{"ONE":"1","TWO":"2","THREE":"3"}"`) }) test('Object.prototype.toString', () => { expect(Object.prototype.toString.call(StrictEnum)).toMatchInlineSnapshot(`"[object Object]"`) }) test('iterator', () => { expect(([] as object[]).concat(StrictEnum)).toEqual([StrictEnum]) }) test('toPrimitive', () => { expect(+StrictEnum).toBeNaN() })

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