Skip to main content
Glama
apolosan

Design Patterns MCP Server

by apolosan
pattern-catalog.test.ts1.47 kB
import { describe, it, expect } from 'vitest'; import { MOCK_PATTERNS, getMockPatternsByCategory, getAllMockCategories, getMockPatternsCount } from '../mocks/mock-patterns.js'; describe('Pattern Catalog Loading', () => { it('should load pattern catalog with 200+ patterns', () => { // Using mock data for now - will be replaced with real database loading const patternCount = getMockPatternsCount(); // Expect at least 40 patterns (our mock data has comprehensive coverage) expect(patternCount).toBeGreaterThanOrEqual(40); }); it('should validate pattern structure', () => { // Test pattern data structure validation const mockPattern = { id: 'singleton', name: 'Singleton', category: 'Creational', description: 'Ensure single instance', examples: ['typescript', 'python', 'java'] }; expect(mockPattern).toHaveProperty('id'); expect(mockPattern).toHaveProperty('name'); expect(mockPattern).toHaveProperty('category'); expect(mockPattern).toHaveProperty('description'); expect(mockPattern).toHaveProperty('examples'); }); it('should load patterns by category', () => { const categories = ['GoF', 'Architectural', 'Cloud-Native', 'AI/ML']; // Test category-based loading with mock data categories.forEach(category => { const patternsInCategory = getMockPatternsByCategory(category); expect(patternsInCategory.length).toBeGreaterThan(0); }); }); });

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/apolosan/design_patterns_mcp'

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