import { buildRuntimeStatus } from '../../src/comm/runtime-state';

describe('runtime-state', () => {
  it('builds status payload from actual runtime inputs', () => {
    const status = buildRuntimeStatus({
      port: 8007,
      ready: true,
      controlBaseUrl: 'http://127.0.0.1:8007',
      dataDir: 'D:/NetaData',
      logDir: 'D:/NetaData/logs',
      configDir: 'C:/Program Files/Neta',
      pid: 1234,
      startedAt: '2026-04-25T10:00:00.000Z',
    });

    expect(status.url).toBe('http://127.0.0.1:8007');
    expect(status.controlBaseUrl).toBe('http://127.0.0.1:8007');
    expect(status.paths.logDir).toBe('D:/NetaData/logs');
  });
});
