mirror of
https://github.com/thedotmack/claude-mem.git
synced 2026-09-20 04:23:02 +08:00
166b956e88
# Conflicts: # package.json # plugin/scripts/context-generator.cjs # plugin/scripts/mcp-server.cjs # plugin/scripts/server-service.cjs # plugin/scripts/worker-service.cjs # plugin/ui/viewer-bundle.js # src/npx-cli/commands/install.ts # src/server/runtime/ServerService.ts # src/server/runtime/create-server-service.ts # src/services/worker-service.ts # tests/hooks/server-client.test.ts
21 lines
846 B
TypeScript
21 lines
846 B
TypeScript
import { describe, expect, it } from 'bun:test';
|
|
import { startCommandWantsDaemon } from '../../src/server/runtime/ServerService.js';
|
|
|
|
// #2444 — `start` must be FOREGROUND by default (usable under systemd
|
|
// Type=simple) and detach only when `--daemon` is explicitly passed.
|
|
describe('server CLI start mode (#2444)', () => {
|
|
it('runs in the foreground by default (no flags)', () => {
|
|
expect(startCommandWantsDaemon([])).toBe(false);
|
|
});
|
|
|
|
it('detaches into a daemon only when --daemon is passed', () => {
|
|
expect(startCommandWantsDaemon(['--daemon'])).toBe(true);
|
|
expect(startCommandWantsDaemon(['-d'])).toBe(true);
|
|
});
|
|
|
|
it('ignores unrelated flags and stays foreground', () => {
|
|
expect(startCommandWantsDaemon(['--verbose'])).toBe(false);
|
|
expect(startCommandWantsDaemon(['--port', '9999'])).toBe(false);
|
|
});
|
|
});
|