mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-05 15:09:42 +02:00
chore: remove dead test and script files
Dead-code sweep via knip. All files below have zero importers and were leftovers from the local-echo overlay exploration or duplicated by files under test/mocks/. Deleted: - test/respawn-test-utils.ts (728-line duplicate of test/mocks/*) - test/input-echo-test.mjs - test/local-echo-*.mjs (7 files) - test/manual/*.mjs (10 files; dir removed) - scripts/remotion/components/TerminalScreen.tsx (unused Remotion demo) Also cleaned stale JSDoc references to the removed respawn-test-utils.ts in test/mocks/mock-session.ts and test/mocks/test-helpers.ts. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
/**
|
||||
* Shared MockSession for tests that need terminal simulation.
|
||||
*
|
||||
* Copied from test/respawn-test-utils.ts (the canonical, most complete version).
|
||||
* Used by respawn, route, and subagent tests.
|
||||
*/
|
||||
import { EventEmitter } from 'node:events';
|
||||
|
||||
@@ -1,18 +1,17 @@
|
||||
/**
|
||||
* Reusable async test helpers.
|
||||
* Extracted from respawn-test-utils.ts.
|
||||
*/
|
||||
|
||||
/** Wait for an EventEmitter to emit a specific event, with timeout */
|
||||
export function waitForEvent(
|
||||
emitter: { once: (event: string, listener: (...args: unknown[]) => void) => void },
|
||||
event: string,
|
||||
timeoutMs = 5000,
|
||||
timeoutMs = 5000
|
||||
): Promise<unknown> {
|
||||
return new Promise((resolve, reject) => {
|
||||
const timer = setTimeout(
|
||||
() => reject(new Error(`Timed out waiting for event "${event}" after ${timeoutMs}ms`)),
|
||||
timeoutMs,
|
||||
timeoutMs
|
||||
);
|
||||
emitter.once(event, (...args: unknown[]) => {
|
||||
clearTimeout(timer);
|
||||
|
||||
Reference in New Issue
Block a user