We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/mkreyman/mcp-memory-keeper'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
global-teardown.js•994 B
/**
* Global teardown for Jest tests
* Ensures all resources are cleaned up after test suite completion
*/
module.exports = async () => {
// Force cleanup any remaining resources
process.removeAllListeners();
// Clean up any remaining child processes
if (global.testProcesses) {
for (const proc of global.testProcesses) {
if (proc && !proc.killed) {
proc.kill('SIGKILL');
}
}
}
// Clean up any remaining database connections
if (global.testDatabases) {
for (const db of global.testDatabases) {
try {
if (db && typeof db.close === 'function') {
db.close();
}
} catch (error) {
console.warn('Error closing database during teardown:', error.message);
}
}
}
// Force garbage collection if available
if (global.gc) {
global.gc();
}
// Give time for cleanup to complete
await new Promise(resolve => setTimeout(resolve, 1000));
console.log('Global teardown completed');
};