Files
thedotmack__claude-mem/tests/npx-cli/server-runtime-setup.test.ts
Alex Newman 2a0a407340 chore: remove over-engineering findings from repo-wide ponytail audit (wave 1)
Cuts verified dead code, duplication, and speculative abstractions across
14 disjoint areas of the tree: sqlite layer, worker HTTP routes, search
pipeline, server, chroma sync, viewer UI, npx-cli, MCP server, shared/utils,
telemetry/infra, integrations, scripts, tests, and stale plans/evals docs.

Also unifies the Chroma search pipeline onto SearchOrchestrator/strategies
and ports dual-project (merged_into_project) scoping plus dateRange
filtering into ChromaSearchStrategy, which corpus builds need but had
silently lost.

Full audit trail: 65-agent verification workflow wf_160a7862-1a6, 14-agent
execution wf_c7e48c0f-164, 6-agent fixup wf_865f86a4-c6b.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-02 20:49:27 -07:00

18 lines
832 B
TypeScript

// SPDX-License-Identifier: Apache-2.0
import { describe, it, expect } from 'bun:test';
import { normalizeRuntimeFlag } from '../../src/npx-cli/commands/server-runtime-setup.js';
describe('server-runtime-setup — install planning (#2543)', () => {
it('normalizeRuntimeFlag accepts worker/server/server-beta and the default', () => {
expect(normalizeRuntimeFlag(undefined)).toBe('worker');
expect(normalizeRuntimeFlag('')).toBe('worker');
expect(normalizeRuntimeFlag('worker')).toBe('worker');
expect(normalizeRuntimeFlag('server')).toBe('server');
// Phase 1d: legacy literal accepted, normalized to canonical 'server'.
expect(normalizeRuntimeFlag('server-beta')).toBe('server');
expect(normalizeRuntimeFlag('SERVER')).toBe('server');
expect(normalizeRuntimeFlag('bogus')).toBeNull();
});
});