Skip to main content
Glama

Timezone MCP Server

by sam-artuso
mcp-auth-guard.module.spec.tsβ€’1.81 kB
import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest' import { Test, TestingModule } from '@nestjs/testing' import { ConfigService } from '@nestjs/config' import { McpAuthGuardModule } from './mcp-auth-guard.module' import { AllowlistService } from './allowlist.service' import { EmailAllowlistGuard } from './email-allowlist.guard' describe('McpAuthGuardModule', () => { let module: TestingModule let consoleWarnSpy: ReturnType<typeof vi.spyOn> beforeEach(async () => { // Suppress console.warn for tests that intentionally use empty email lists consoleWarnSpy = vi.spyOn(console, 'warn').mockImplementation(() => {}) module = await Test.createTestingModule({ imports: [McpAuthGuardModule], providers: [ { provide: ConfigService, useValue: { get: vi.fn().mockReturnValue('test@example.com'), }, }, ], }).compile() }) afterEach(() => { consoleWarnSpy.mockRestore() }) it('should be defined', () => { expect(module).toBeDefined() }) it('should provide AllowlistService', () => { const service = module.get<AllowlistService>(AllowlistService) expect(service).toBeDefined() expect(service).toBeInstanceOf(AllowlistService) }) it('should provide EmailAllowlistGuard', () => { const guard = module.get<EmailAllowlistGuard>(EmailAllowlistGuard) expect(guard).toBeDefined() expect(guard).toBeInstanceOf(EmailAllowlistGuard) }) it('should export AllowlistService', () => { const service = module.get<AllowlistService>(AllowlistService) expect(service).toBeDefined() }) it('should export EmailAllowlistGuard', () => { const guard = module.get<EmailAllowlistGuard>(EmailAllowlistGuard) expect(guard).toBeDefined() }) })

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/sam-artuso/demo-mcp'

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