Skip to main content
Glama
Azure

Azure MCP Server

Official
unitTests.ts1.47 kB
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. import * as path from 'path'; import * as Mocha from 'mocha'; import * as glob from 'glob'; export function run(): Promise<void> { const opts: Mocha.MochaOptions = { ui: 'tdd', color: true, timeout: process.env.TEST_TIMEOUT ?? "10s", slow: 200 }; const mocha = new Mocha(opts); const testsRoot = path.resolve(__dirname, '..'); return new Promise((c, e) => { // Find both legacy and new-style unit tests glob('suite/unit/**/**.test.js', { cwd: testsRoot }, (err, suiteFiles) => { if (err) { return e(err); } glob('*.unit.test.js', { cwd: testsRoot }, (err2, unitFiles) => { if (err2) { return e(err2); } const files = [...suiteFiles, ...unitFiles]; files.forEach(f => mocha.addFile(path.resolve(testsRoot, f))); try { mocha.run(failures => { if (failures > 0) { e(new Error(`${failures} tests failed.`)); } else { c(); } }); } catch (err) { console.error(err); e(err); } }); }); }); }

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/Azure/azure-mcp'

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