Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions tests/fixtures/azure-mcp-tool-names.snapshot.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"source": "npx -y @azure/mcp server start (initialize + tools/list)",
"toolReferenceConvention": "References must match exact tool names from toolNames. Compound forms like <toolName>_* are not supported.",
"azureMcpVersion": "3.0.0-beta.3+ae9594a1268710e678c0a6c9f9801212b1ee3694",
"toolNames": [
"acr",
Expand Down
11 changes: 4 additions & 7 deletions tests/mcp-tool-references/unit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,6 @@ describe("Azure MCP tool references in skill markdown", () => {
continue;
}

const hasValidNamespacePrefix = snapshot.toolNames.some((snapshotToolName) =>
resolvedToolName.startsWith(`${snapshotToolName}_`),
);
if (hasValidNamespacePrefix) {
continue;
}

const relativePath = path.relative(skillsRoot, markdownPath);
unknownReferences.push(`${toolReference} (${relativePath})`);
}
Expand All @@ -74,11 +67,15 @@ describe("Azure MCP tool references in skill markdown", () => {
test("snapshot file exists and has expected shape", () => {
const snapshot = JSON.parse(readFileSync(snapshotPath, "utf8")) as {
source?: string;
toolReferenceConvention?: string;
azureMcpVersion?: string;
toolNames?: string[];
};

expect(typeof snapshot.source).toBe("string");
expect(snapshot.toolReferenceConvention).toBe(
"References must match exact tool names from toolNames. Compound forms like <toolName>_* are not supported.",
);
expect(typeof snapshot.azureMcpVersion).toBe("string");
expect(Array.isArray(snapshot.toolNames)).toBe(true);
expect(snapshot.toolNames?.length).toBeGreaterThan(0);
Expand Down
2 changes: 2 additions & 0 deletions tests/scripts/update-mcp-tool-snapshot.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,8 @@ async function main() {

const snapshot = {
source: "npx -y @azure/mcp server start (initialize + tools/list)",
toolReferenceConvention:
"References must match exact tool names from toolNames. Compound forms like <toolName>_* are not supported.",
azureMcpVersion: version,
toolNames,
};
Expand Down