Skip to main content
Glama

Simple MCP Server

nullable.test.ts591 B
import { expect, test } from "vitest"; import * as z from "zod/v4"; test(".nullable()", () => { const nullable = z.string().nullable(); expect(nullable.parse(null)).toBe(null); expect(nullable.parse("asdf")).toBe("asdf"); expect(() => nullable.parse(123)).toThrow(); }); test(".nullable unwrap", () => { const schema = z.string().nullable(); expect(schema).toBeInstanceOf(z.ZodNullable); expect(schema.unwrap()).toBeInstanceOf(z.ZodString); }); test("z.null", () => { const n = z.null(); expect(n.parse(null)).toBe(null); expect(() => n.parse("asdf")).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/shaleen-wonder-ent/simple-mcp-server'

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