← Back to PRs

#13848: fix(test): normalize paths in source-display test for windows

by gengmao open 2026-02-11 03:20 View on GitHub →
size: XS
Fixes Windows CI failure in `src/plugins/source-display.test.ts` by normalizing backslashes to forward slashes before assertion. This test was failing on Windows runners because `path.relative` produces OS-specific separators. <!-- greptile_comment --> <h2>Greptile Overview</h2> <h3>Greptile Summary</h3> This PR updates `src/plugins/source-display.test.ts` to normalize path separators (`\\` → `/`) before asserting expected relative plugin source strings. The intent is to make the test output stable across OSes (Windows `path.relative` uses backslashes). In the current codebase, the production implementation already normalizes `path.relative(...)` results to forward slashes in `src/plugins/source-display.ts` (via `rel.replaceAll("\\", "/")`), so these extra normalizations in the test are redundant but harmless. No functional behavior changes are introduced outside the test, and there are no merge-blocking issues found. <h3>Confidence Score: 5/5</h3> - This PR is safe to merge with minimal risk. - Change is limited to test assertions and uses a supported string operation; production code already normalizes path separators so the change is redundant but not harmful. - src/plugins/source-display.test.ts <!-- greptile_other_comments_section --> <sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub> <!-- /greptile_comment -->

Most Similar PRs