mirror of
https://github.com/nexu-io/open-design.git
synced 2026-10-27 09:51:12 +01:00
* test(e2e): harden coverage and runtime isolation * test(e2e): gate prerelease on full functional suite * test(daemon): enforce prerelease coverage * test(daemon): stabilize full-suite fixtures Generated-By: looper 0.11.8 (runner=fixer, agent=codex) * test(e2e): preserve interaction regression coverage Keep deck navigation subject to Playwright actionability checks and restore the current rail updater/composer stacking witness as an explicit expected failure. Generated-By: looper 0.11.8 (runner=fixer, agent=codex) * fix(ci): close conformance validation gaps Generated-By: looper 0.11.8 (runner=fixer, agent=codex) * test(e2e): restore MCP snippet style guard Restore the browser-computed style witness that was over-deleted when the OAuth flow moved to Integrations, and navigate through the current Settings MCP server entry.\n\nGenerated-By: looper 0.11.8 (runner=fixer, agent=codex) * fix(ci): close directive and job-boundary gaps Compare normalized MUST_FIX directives as sets so identical multi-item rounds remain weak debates, and bound workflow topology assertions to their immediate sibling jobs.\n\nGenerated-By: looper 0.11.8 (runner=fixer, agent=codex)
27 lines
1.1 KiB
TypeScript
27 lines
1.1 KiB
TypeScript
import type http from 'node:http';
|
|
import { describe, expect, it } from 'vitest';
|
|
|
|
import { startServer } from '../src/server.js';
|
|
|
|
describe('daemon fatal telemetry handler lifecycle', () => {
|
|
it('removes process-wide fatal handlers when the server closes', async () => {
|
|
const uncaughtBaseline = process.listenerCount('uncaughtException');
|
|
const rejectionBaseline = process.listenerCount('unhandledRejection');
|
|
const started = await startServer({ port: 0, returnServer: true }) as {
|
|
server: http.Server;
|
|
shutdown?: () => Promise<void> | void;
|
|
};
|
|
|
|
expect(process.listenerCount('uncaughtException')).toBe(uncaughtBaseline + 1);
|
|
expect(process.listenerCount('unhandledRejection')).toBe(rejectionBaseline + 1);
|
|
|
|
await Promise.resolve(started.shutdown?.());
|
|
await new Promise<void>((resolve, reject) => {
|
|
started.server.close((error) => error ? reject(error) : resolve());
|
|
});
|
|
|
|
expect(process.listenerCount('uncaughtException')).toBe(uncaughtBaseline);
|
|
expect(process.listenerCount('unhandledRejection')).toBe(rejectionBaseline);
|
|
});
|
|
});
|