fix(test): Use path.join in cliReport skill-directory assertion for Windows

The test asserted on a literal '.claude/skills/test-skill' substring, but
getDisplayPath calls path.relative which produces backslashes on Windows.
CI failed on all Windows runners. Constructing the expected substring
with path.join makes the assertion OS-native.
This commit is contained in:
Kazuki Yamada
2026-04-26 19:55:58 +09:00
parent 402e4906d7
commit 94cf791102
+8 -2
View File
@@ -185,10 +185,16 @@ describe('cliReport', () => {
skippedFiles: [],
};
reportSummary('/test/project', packResult, config, { skillDir: '/test/project/.claude/skills/test-skill' });
// Use path.join so the expected substring uses the OS-native separator
// — getDisplayPath calls path.relative, which yields backslashes on Windows.
const cwd = path.join('/test', 'project');
const skillDir = path.join(cwd, '.claude', 'skills', 'test-skill');
const expectedRelative = path.join('.claude', 'skills', 'test-skill');
reportSummary(cwd, packResult, config, { skillDir });
expect(logger.log).toHaveBeenCalledWith(expect.stringContaining('skill directory'));
expect(logger.log).toHaveBeenCalledWith(expect.stringContaining('.claude/skills/test-skill'));
expect(logger.log).toHaveBeenCalledWith(expect.stringContaining(expectedRelative));
});
test('should print first…last paths and part count for split outputs', () => {