skillhub/plugins/dsh/test/operation-presentation.test.ts
XiaoSeS 3560679793
Some checks failed
Deploy Docs / build (push) Has been cancelled
Security / Dependency Review (push) Has been cancelled
Security / CodeQL (java-kotlin) (push) Has been cancelled
Security / CodeQL (javascript-typescript) (push) Has been cancelled
Security / CodeQL (python) (push) Has been cancelled
Deploy Docs / Deploy (push) Has been cancelled
feat(dsh): add native SkillHub plugin for DeepSeek Harness (#956)
Add the native SkillHub plugin for DeepSeek Harness with a scoped skill center, conversation search/install tools, exact-version installation and protected lifecycle management. Prepare the independently versioned 0.1.0 npm candidate with an empty default Registry and documented compatibility limits.

Keep formal specifications and executable regression tests; remove archived development screenshots and runtime reports from the final tree. Review fixes cover independent scopes, installed references, pre-staging recovery and idempotent discovery.

Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>
2026-10-16 19:22:26 +08:00

15 lines
834 B
TypeScript

import { expect, test } from 'bun:test';
import { canCollapseHistory } from '../src/client/operation-presentation.js';
import type { NativeOperation } from '../src/host/types.js';
test('history never hides unconfirmed, failed, recovering or warned operations', () => {
expect(canCollapseHistory(undefined, false)).toBe(false);
expect(canCollapseHistory(null, false)).toBe(false);
const complete = { phase: 'completed' as const, warningCount: 0 };
expect(canCollapseHistory(complete, false)).toBe(true);
expect(canCollapseHistory(complete, true)).toBe(false);
expect(canCollapseHistory({ ...complete, warningCount: 1 }, false)).toBe(false);
for (const phase of ['failed', 'recovery-required', 'unknown'] as NativeOperation['phase'][]) {
expect(canCollapseHistory({ ...complete, phase }, false)).toBe(false);
}
});