Skip to main content
Glama
config.test.ts1.98 kB
import { getFilePathFromEnv, loadEnvConfig, config } from '../config' describe('Config Module', function () { describe('getFilePathFromEnv', function () { it('should return log file path when LOG_FILE_PATH is set', function () { // Set environment variable process.env.LOG_FILE_PATH = '/path/to/logs' // Test function const result = getFilePathFromEnv() // Verify result expect(result).toBe('/path/to/logs') }) it('should return undefined when LOG_FILE_PATH is not set', function () { // Delete environment variable if exists delete process.env.LOG_FILE_PATH // Test function const result = getFilePathFromEnv() // Verify result is undefined expect(result).toBeUndefined() }) }) describe('loadEnvConfig', function () { it('should use default tool list', function () { // Call loadEnvConfig const result = loadEnvConfig() // Verify default tools are used expect(result.tools?.enabledTools).toEqual([ 'getJiraIssue', 'analyzeJiraIssue', 'jiraGet', 'getIssuesByJql', // Issue Creation Wizard tools 'issueCreation_getState', 'issueCreation_getStatus', 'issueCreation_initiateState', 'issueCreation_resetState', 'issueCreation_updateState', 'issueCreation_createIssue', 'issueCreation_getProjects', 'issueCreation_getIssueTypes', 'issueCreation_getFields', 'issueCreation_updateFields', 'issueCreation_setAnalysisComplete', 'issueCreation_setUserConfirmation', 'issueCreation_analyzeIssue', 'issueUpdateWizard_updateIssueFromState', 'issueUpdateWizard_loadIssueIntoState', ]) }) }) describe('config', function () { it('should have expected structure', function () { // Verify config has expected structure expect(config).toHaveProperty('server.name') expect(config).toHaveProperty('server.version') expect(config).toHaveProperty('logging.filePath') expect(config).toHaveProperty('tools.enabledTools') }) }) })

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/tbreeding/jira-mcp'

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