MCPcopy
hub / github.com/vercel-labs/just-bash / normalizeOutput

Function normalizeOutput

packages/just-bash/src/spec-tests/runner.ts:295–302  ·  view source on GitHub ↗

* Normalize output for comparison * - Strip comment lines (starting with #) - these are metadata in spec test STDOUT sections * - Trim trailing whitespace from each line * - Ensure consistent line endings * - Trim trailing newline

(output: string)

Source from the content-addressed store, hash-verified

293 * - Trim trailing newline
294 */
295function normalizeOutput(output: string): string {
296 return output
297 .split("\n")
298 .filter((line) => !line.startsWith("#")) // Strip comment lines
299 .map((line) => line.trimEnd())
300 .join("\n")
301 .replace(/\n+$/, "");
302}
303
304/**
305 * Get summary statistics for test results

Callers 1

runTestCaseFunction · 0.70

Calls 2

replaceMethod · 0.65
splitMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…