Merge pull request #1394 from Tibsfox/fix/issue-triage-batch-1392-1391-1389
fix: trailing slash, slug newlines, and duplicate command registration
This commit is contained in:
@@ -366,6 +366,17 @@ describe('generateSlugInternal', () => {
|
||||
test('returns null for empty string', () => {
|
||||
assert.strictEqual(generateSlugInternal(''), null);
|
||||
});
|
||||
|
||||
test('strips newlines and control characters', () => {
|
||||
assert.strictEqual(generateSlugInternal('hello\nworld'), 'hello-world');
|
||||
assert.strictEqual(generateSlugInternal('tab\there'), 'tab-here');
|
||||
});
|
||||
|
||||
test('truncates to 60 characters', () => {
|
||||
const long = 'a'.repeat(100);
|
||||
const result = generateSlugInternal(long);
|
||||
assert.ok(result.length <= 60, `slug should be <=60 chars, got ${result.length}`);
|
||||
});
|
||||
});
|
||||
|
||||
// ─── normalizePhaseName / comparePhaseNum ──────────────────────────────────────
|
||||
|
||||
@@ -105,10 +105,11 @@ describe('convertClaudeToWindsurfMarkdown', () => {
|
||||
assert.ok(!result.includes('Claude Code'), 'original brand removed');
|
||||
});
|
||||
|
||||
test('replaces CLAUDE.md with .windsurf/rules/', () => {
|
||||
test('replaces CLAUDE.md with .windsurf/rules (no trailing slash)', () => {
|
||||
const input = 'See `CLAUDE.md` for configuration. Also check ./CLAUDE.md file.';
|
||||
const result = convertClaudeToWindsurfMarkdown(input);
|
||||
assert.ok(result.includes('.windsurf/rules/'), 'CLAUDE.md replaced');
|
||||
assert.ok(result.includes('.windsurf/rules'), 'CLAUDE.md replaced');
|
||||
assert.ok(!result.includes('.windsurf/rules/'), 'no trailing slash (Node v25 compat)');
|
||||
});
|
||||
|
||||
test('replaces .claude/skills/ with .windsurf/skills/', () => {
|
||||
|
||||
Reference in New Issue
Block a user