Skip to main content
Glama
alexander-zuev

Kollektiv | Your private LLM knowledgebase

authHeader.test.ts576 B
import {describe, expect, it, vi} from 'vitest'; // Then import it normally to get the real implementation import {getAuthHeader} from '@/features/auth/utils'; // First unmock the module vi.unmock('@/features/auth/utils'); describe('No frills getAuthHeader unit tests', () => { it('returns { Authorization } when JWT present', () => { const token = 'test_token' expect(getAuthHeader(token)).toEqual({Authorization: 'Bearer test_token'}); }); it('returns { } when JWT not present', () => { expect(getAuthHeader()).toEqual({}); }); });

Latest Blog Posts

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/alexander-zuev/kollektiv-mcp'

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