Skip to content

Commit 5f5740f

Browse files
Copilotpelikhan
andcommitted
Fix parse_mcp_scripts_logs.test.cjs: update test fixture messages from 'Safe Inputs MCP Server' to 'mcp-scripts MCP Server'
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
1 parent 54713f9 commit 5f5740f

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

actions/setup/js/parse_mcp_scripts_logs.test.cjs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,13 @@ describe("parse_mcp_scripts_logs.cjs", () => {
5656

5757
describe("parseMCPScriptsLogLine", () => {
5858
it("should parse valid mcp-scripts log line with standard format", () => {
59-
const line = "[2025-12-31T15:43:54.123Z] [mcp-scripts-server] Starting Safe Inputs MCP Server";
59+
const line = "[2025-12-31T15:43:54.123Z] [mcp-scripts-server] Starting mcp-scripts MCP Server";
6060
const result = parseMCPScriptsLogLine(line);
6161

6262
expect(result).not.toBeNull();
6363
expect(result.timestamp).toBe("2025-12-31T15:43:54.123Z");
6464
expect(result.serverName).toBe("mcp-scripts-server");
65-
expect(result.message).toBe("Starting Safe Inputs MCP Server");
65+
expect(result.message).toBe("Starting mcp-scripts MCP Server");
6666
expect(result.raw).toBe(false);
6767
});
6868

@@ -147,7 +147,7 @@ describe("parse_mcp_scripts_logs.cjs", () => {
147147
describe("generatePlainTextSummary", () => {
148148
it("should generate summary with startup events", () => {
149149
const logEntries = [
150-
{ timestamp: "2025-12-31T15:43:54.123Z", serverName: "mcp-scripts", message: "Starting Safe Inputs MCP Server", raw: false },
150+
{ timestamp: "2025-12-31T15:43:54.123Z", serverName: "mcp-scripts", message: "Starting mcp-scripts MCP Server", raw: false },
151151
{ timestamp: "2025-12-31T15:43:54.456Z", serverName: "mcp-scripts", message: "Server started successfully", raw: false },
152152
];
153153

@@ -201,7 +201,7 @@ describe("parse_mcp_scripts_logs.cjs", () => {
201201

202202
it("should generate summary with mixed event types", () => {
203203
const logEntries = [
204-
{ timestamp: "2025-12-31T15:43:54.000Z", serverName: "mcp-scripts", message: "Starting Safe Inputs MCP Server", raw: false },
204+
{ timestamp: "2025-12-31T15:43:54.000Z", serverName: "mcp-scripts", message: "Starting mcp-scripts MCP Server", raw: false },
205205
{ timestamp: "2025-12-31T15:43:55.000Z", serverName: "mcp-scripts", message: "Registering tool: create_issue", raw: false },
206206
{ timestamp: "2025-12-31T15:44:10.000Z", serverName: "mcp-scripts", message: "Calling handler for tool: create_issue", raw: false },
207207
{ timestamp: "2025-12-31T15:44:10.500Z", serverName: "mcp-scripts", message: "Handler returned successfully", raw: false },
@@ -228,15 +228,15 @@ describe("parse_mcp_scripts_logs.cjs", () => {
228228

229229
it("should include full logs in plain text summary", () => {
230230
const logEntries = [
231-
{ timestamp: "2025-12-31T15:43:54.000Z", serverName: "mcp-scripts", message: "Starting Safe Inputs MCP Server", raw: false },
231+
{ timestamp: "2025-12-31T15:43:54.000Z", serverName: "mcp-scripts", message: "Starting mcp-scripts MCP Server", raw: false },
232232
{ timestamp: "2025-12-31T15:43:55.000Z", serverName: "mcp-scripts", message: "Server started successfully", raw: false },
233233
{ timestamp: null, serverName: null, message: "Unparsed log line", raw: true },
234234
];
235235

236236
const summary = generatePlainTextSummary(logEntries);
237237

238238
expect(summary).toContain("Full Logs (first 5000 lines):");
239-
expect(summary).toContain("[mcp-scripts] Starting Safe Inputs MCP Server");
239+
expect(summary).toContain("[mcp-scripts] Starting mcp-scripts MCP Server");
240240
expect(summary).toContain("[mcp-scripts] Server started successfully");
241241
expect(summary).toContain("Unparsed log line");
242242
});
@@ -267,7 +267,7 @@ describe("parse_mcp_scripts_logs.cjs", () => {
267267
describe("generateMCPScriptsSummary", () => {
268268
it("should generate markdown summary with details/summary structure", () => {
269269
const logEntries = [
270-
{ timestamp: "2025-12-31T15:43:54.000Z", serverName: "mcp-scripts", message: "Starting Safe Inputs MCP Server", raw: false },
270+
{ timestamp: "2025-12-31T15:43:54.000Z", serverName: "mcp-scripts", message: "Starting mcp-scripts MCP Server", raw: false },
271271
{ timestamp: "2025-12-31T15:43:55.000Z", serverName: "mcp-scripts", message: "Registering tool: create_issue", raw: false },
272272
{ timestamp: "2025-12-31T15:44:10.000Z", serverName: "mcp-scripts", message: "Calling handler for tool: create_issue", raw: false },
273273
];
@@ -317,7 +317,7 @@ describe("parse_mcp_scripts_logs.cjs", () => {
317317

318318
it("should generate markdown summary with full logs section", () => {
319319
const logEntries = [
320-
{ timestamp: "2025-12-31T15:43:54.000Z", serverName: "mcp-scripts", message: "Starting Safe Inputs MCP Server", raw: false },
320+
{ timestamp: "2025-12-31T15:43:54.000Z", serverName: "mcp-scripts", message: "Starting mcp-scripts MCP Server", raw: false },
321321
{ timestamp: null, serverName: null, message: "Unparsed log line", raw: true },
322322
];
323323

@@ -326,7 +326,7 @@ describe("parse_mcp_scripts_logs.cjs", () => {
326326
expect(summary).toContain("**Full Logs**");
327327
expect(summary).toContain("<summary>View full mcp-scripts logs</summary>");
328328
expect(summary).toContain("```");
329-
expect(summary).toContain("[2025-12-31T15:43:54.000Z] [mcp-scripts] Starting Safe Inputs MCP Server");
329+
expect(summary).toContain("[2025-12-31T15:43:54.000Z] [mcp-scripts] Starting mcp-scripts MCP Server");
330330
expect(summary).toContain("Unparsed log line");
331331
});
332332

@@ -344,15 +344,15 @@ describe("parse_mcp_scripts_logs.cjs", () => {
344344
});
345345

346346
it("should not show tool executions section when no tools called", () => {
347-
const logEntries = [{ timestamp: "2025-12-31T15:43:54.000Z", serverName: "mcp-scripts", message: "Starting Safe Inputs MCP Server", raw: false }];
347+
const logEntries = [{ timestamp: "2025-12-31T15:43:54.000Z", serverName: "mcp-scripts", message: "Starting mcp-scripts MCP Server", raw: false }];
348348

349349
const summary = generateMCPScriptsSummary(logEntries);
350350

351351
expect(summary).not.toContain("**Tool Executions**");
352352
});
353353

354354
it("should not show errors section when no errors", () => {
355-
const logEntries = [{ timestamp: "2025-12-31T15:43:54.000Z", serverName: "mcp-scripts", message: "Starting Safe Inputs MCP Server", raw: false }];
355+
const logEntries = [{ timestamp: "2025-12-31T15:43:54.000Z", serverName: "mcp-scripts", message: "Starting mcp-scripts MCP Server", raw: false }];
356356

357357
const summary = generateMCPScriptsSummary(logEntries);
358358

@@ -389,7 +389,7 @@ describe("parse_mcp_scripts_logs.cjs", () => {
389389
});
390390

391391
it("should process log files and generate summaries", async () => {
392-
const logContent = "[2025-12-31T15:43:54.000Z] [mcp-scripts] Starting Safe Inputs MCP Server\n[2025-12-31T15:43:55.000Z] [mcp-scripts] Registering tool: create_issue\n";
392+
const logContent = "[2025-12-31T15:43:54.000Z] [mcp-scripts] Starting mcp-scripts MCP Server\n[2025-12-31T15:43:55.000Z] [mcp-scripts] Registering tool: create_issue\n";
393393

394394
// Mock fs functions
395395
vi.spyOn(fs, "existsSync").mockReturnValue(true);

0 commit comments

Comments
 (0)