Files
oh-my-claudecode/dist/__tests__/hud-skill-no-inline-wrapper.test.js
Codex Review 287565314b chore(release): bump version to v4.11.6
- Ralph security hardening: PRD gating non-bypassable, approval spoofing closed
- Permission handler: narrowed trust boundary, read-only gh commands allowed
- HUD: MiniMax coding plan provider, extra usage spend data, per-provider cache split
- tmux/openclaw: dead-pane suppression, stale replay suppression, keyword false-positive reduction
- Context dedup: no duplicate rule/skill injection from coexisting plugin+standalone
- Installer: user skills with OMC-style frontmatter preserved during updates
- Test isolation fix: hud-marketplace-resolution afterAll + setup-contracts-regression beforeAll
  restore hooks/hooks.json to prevent parallel worker race in full test suite

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 14:03:35 +00:00

26 lines
1.3 KiB
JavaScript
Generated

import { describe, it, expect } from 'vitest';
import { readFileSync } from 'node:fs';
import { join, dirname } from 'node:path';
import { fileURLToPath } from 'node:url';
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
const root = join(__dirname, '..', '..');
const SKILL_PATH = join(root, 'skills', 'hud', 'SKILL.md');
describe('HUD skill — no inline wrapper', () => {
const content = readFileSync(SKILL_PATH, 'utf8');
it('does not embed an inline HUD wrapper script', () => {
// The canonical wrapper lives in scripts/lib/hud-wrapper-template.txt.
// The skill must copy from there, not embed its own version.
// Match signatures unique to the wrapper body that should never appear inline.
expect(content).not.toMatch(/async function main\(\)\s*\{/);
expect(content).not.toMatch(/OMC_DEV.*===.*"1"/);
expect(content).not.toMatch(/import.*from\s*["']node:fs["']/);
});
it('references the canonical template for installation', () => {
expect(content).toMatch(/hud-wrapper-template\.txt/);
});
it('copies config-dir.mjs dependency', () => {
expect(content).toMatch(/config-dir\.mjs/);
});
});
//# sourceMappingURL=hud-skill-no-inline-wrapper.test.js.map