@tiberriver256/mcp-server-azure-devops
Version:
Azure DevOps reference server for the Model Context Protocol (MCP)
46 lines • 2.13 kB
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const feature_1 = require("./feature");
const schema_1 = require("./schema");
const test_helpers_1 = require("@/shared/test/test-helpers");
const axios_1 = __importDefault(require("axios"));
axios_1.default.interceptors.request.use((request) => {
console.log('Starting Request', JSON.stringify(request, null, 2));
return request;
});
describe('createWiki (Integration)', () => {
let connection = null;
let projectName;
const testWikiName = `TestWiki_${new Date().getTime()}`;
beforeAll(async () => {
// Get a real connection using environment variables
connection = await (0, test_helpers_1.getTestConnection)();
projectName = process.env.AZURE_DEVOPS_DEFAULT_PROJECT || 'DefaultProject';
});
test.skip('should create a project wiki', async () => {
// PERMANENTLY SKIPPED: Azure DevOps only allows one wiki per project.
// Running this test multiple times would fail after the first wiki is created.
// This test is kept for reference but cannot be run repeatedly.
// This connection must be available if we didn't skip
if (!connection) {
throw new Error('Connection should be available when test is not skipped');
}
// Create the wiki
const wiki = await (0, feature_1.createWiki)(connection, {
name: testWikiName,
projectId: projectName,
type: schema_1.WikiType.ProjectWiki,
});
// Verify the wiki was created
expect(wiki).toBeDefined();
expect(wiki.name).toBe(testWikiName);
expect(wiki.projectId).toBe(projectName);
expect(wiki.type).toBe(schema_1.WikiType.ProjectWiki);
});
// NOTE: We're not testing code wiki creation since that requires a repository
// that would need to be created/cleaned up and is outside the scope of this test
});
//# sourceMappingURL=feature.spec.int.js.map