mirror of
https://github.com/yamadashy/repomix.git
synced 2026-05-30 11:18:53 +02:00
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:
@@ -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', () => {
|
||||
|
||||
Reference in New Issue
Block a user