import { describe, expect, it } from 'vitest'; import { rewriteSkillAssetUrls } from '../src/server.js'; describe('rewriteSkillAssetUrls', () => { it('rewrites ./assets/ img sources to the daemon route', () => { const html = ``; expect(rewriteSkillAssetUrls(html, 'open-design-landing')).toBe( ``, ); }); it('handles double quotes and the no-leading-dot variant', () => { const html = ``; expect(rewriteSkillAssetUrls(html, 'foo')).toBe( ``, ); }); it('rewrites sibling skill asset references', () => { const html = ``; expect(rewriteSkillAssetUrls(html, 'foo')).toBe( ``, ); }); it('leaves absolute and fragment URLs untouched', () => { const html = ``; expect(rewriteSkillAssetUrls(html, 'foo')).toBe(html); }); it('URL-encodes current and sibling skill ids in rewritten routes', () => { const html = ``; expect(rewriteSkillAssetUrls(html, '../oops')).toBe( ``, ); }); it('returns non-string input unchanged', () => { expect(rewriteSkillAssetUrls('', 'foo')).toBe(''); }); });