Skip to main content
Glama
Apache 2.0
845
2,105
  • Apple
edge-function.test.ts1.04 kB
import { describe, expect, it } from 'vitest'; import { normalizeFilename } from './edge-function.js'; describe('normalizeFilename', () => { it('handles deno 1 paths', () => { const result = normalizeFilename({ deploymentId: 'xnzcmvwhvqonuunmwgdz_2b72daae-bbb3-437f-80cb-46f2df0463d1_2', filename: '/tmp/user_fn_xnzcmvwhvqonuunmwgdz_2b72daae-bbb3-437f-80cb-46f2df0463d1_2/source/index.ts', }); expect(result).toBe('index.ts'); }); it('handles deno 2 paths', () => { const result = normalizeFilename({ deploymentId: 'xnzcmvwhvqonuunmwgdz_2b72daae-bbb3-437f-80cb-46f2df0463d1_2', filename: 'source/index.ts', }); expect(result).toBe('index.ts'); }); it("doesn't interfere with nested directories", () => { const result = normalizeFilename({ deploymentId: 'xnzcmvwhvqonuunmwgdz_2b72daae-bbb3-437f-80cb-46f2df0463d1_2', filename: '/my/local/source/index.ts', }); expect(result).toBe('/my/local/source/index.ts'); }); });

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/supabase-community/mcp-supabase'

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