Files
pauljdandClaude Opus 5.5 934f82d805
pauljd/davidson-ci: Davidson CI / quality (push) Failing after 1m48s
pauljd/davidson-ci: Davidson CI / ai-review (push) Successful in 49s
Orbit TV at 0.16.0-tuning-screen
First commit, imported from the working folder: Android TV app, loopback
guide server, design sources and per-release verification notes.

Includes the 0.16 tuning screen, built and tested but not yet confirmed
on the box.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-01 17:25:30 +00:00

21 lines
1.1 KiB
JavaScript

import { spawn } from 'node:child_process';
import assert from 'node:assert/strict';
const child = spawn(process.execPath, ['dist/server.js'], { stdio: ['ignore', 'pipe', 'pipe'] });
let errors = '';
child.stderr.on('data', chunk => { errors += chunk; });
try {
await new Promise((resolve, reject) => {
child.stdout.once('data', resolve); child.once('error', reject);
child.once('exit', code => reject(new Error(`Server exited ${code}: ${errors}`)));
setTimeout(() => reject(new Error('Startup timeout')), 5000).unref();
});
for (const [path, status] of [['/health',200], ['/guide?at=1793478000000&count=48',200], ['/guide?count=999',400], ['/missing',404]]) {
const response = await fetch(`http://127.0.0.1:4317${path}`);
assert.equal(response.status, status); const body = await response.json();
if(path.includes('count=48')) { assert.equal(body.channels.length,3); assert.equal(body.channels[0].programmes.length,48); }
console.log(`${status} ${path}`);
}
assert.equal((await fetch('http://127.0.0.1:4317/guide', {method:'POST'})).status,405);
console.log('405 POST /guide');
} finally { child.kill('SIGTERM'); }