Skip to main content
Glama
shared-setup.ts2.17 kB
/** * Shared setup and imports for Lists Management E2E Tests */ import { describe, it, expect, beforeAll, afterAll, beforeEach, vi, } from 'vitest'; import { E2ETestBase } from '../../setup.js'; import { E2EAssertions } from '../../utils/assertions.js'; import { loadE2EConfig } from '../../utils/config-loader.js'; import { CompanyFactory, PersonFactory, listFixtures, } from '../../fixtures/index.js'; import type { TestDataObject, McpToolResponse } from '../../types/index.js'; // Import enhanced tool caller with logging and migration import { callListTool, callUniversalTool, validateTestEnvironment, getToolMigrationStats, } from '../../utils/enhanced-tool-caller.js'; import { startTestSuite, endTestSuite } from '../../utils/logger.js'; // Shared test data storage export const testCompanies: TestDataObject[] = []; export const testPeople: TestDataObject[] = []; export const testLists: TestDataObject[] = []; // Shared setup utilities export function createSharedSetup() { return { beforeAll: async () => { // Start comprehensive logging for this test suite startTestSuite('lists-management'); // Validate test environment and tool migration setup const envValidation = await validateTestEnvironment(); if (!envValidation.valid) { console.warn('⚠️ Test environment warnings:', envValidation.warnings); } console.error('📊 Tool migration stats:', getToolMigrationStats()); await E2ETestBase.setup({ requiresRealApi: false, cleanupAfterTests: true, timeout: 120000, }); console.error( '🚀 Starting Lists Management E2E Tests with Universal Tools' ); }, afterAll: async () => { // Cleanup is handled automatically by E2ETestBase.setup() // End comprehensive logging for this test suite endTestSuite(); console.error( '✅ Lists Management E2E Tests completed with enhanced logging' ); }, beforeEach: () => { vi.clearAllMocks(); }, }; } // Export shared utilities export { callListTool, callUniversalTool, E2EAssertions, listFixtures };

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/kesslerio/attio-mcp-server'

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