Files
wehub-resource-sync 070959e133
landing-page-staging / Deploy landing page to staging (push) Has been skipped
landing-page-ci / Validate landing page (push) Failing after 4s
visual-baseline / Capture visual baselines (push) Has been cancelled
bake-plugin-previews / Bake plugin previews (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:00:47 +08:00

20 lines
729 B
TypeScript

// @vitest-environment node
import { describe, expect, test } from 'vitest';
import { isToolsDevPortConflict } from '@/tools-dev/cli';
describe('tools-dev startup conflict detection', () => {
test('classifies port and namespace startup collisions as retryable', () => {
expect(isToolsDevPortConflict(new Error('listen EADDRINUSE: address already in use 127.0.0.1:30123'))).toBe(true);
expect(
isToolsDevPortConflict(
new Error(
'daemon is already running in namespace e2e-orbit-run-123 at http://127.0.0.1:36695; stop it or choose another namespace',
),
),
).toBe(true);
expect(isToolsDevPortConflict(new Error('daemon exited before readiness'))).toBe(false);
});
});