components
All repositories: gitoria
1.3 KB
// refused-catch.mjs — mission 517 (hybriel#240). A fetch to a closed port, an unknown host// and a closed https port must each give an error `on Error` can catch, with the host:port and// the reason in the message, and the program must run on to its end.import { spawnSync } from 'node:child_process';import net from 'node:net';import path from 'node:path';import { fileURLToPath } from 'node:url';const HERE = path.dirname(fileURLToPath(import.meta.url));const ROOT = path.resolve(HERE, '../../..');const BIN = process.env.HL_BIN || path.resolve(ROOT, 'native/zig-out/bin/hybriel');// Find a port nothing listens on: bind one, note it, close it.const probe = net.createServer();await new Promise((r) => probe.listen(0, '127.0.0.1', r));const port = probe.address().port;await new Promise((r) => probe.close(r));const r = spawnSync(BIN, [path.join(HERE, 'refused_catch.hl')], {env: { ...process.env, HL_TEST_PORT: String(port) }, encoding: 'utf8', timeout: 60000,});const log = (r.stdout || '') + (r.stderr || '');const ok = r.status === 0&& log.includes(`127.0.0.1:${port}/x: connection refused`)&& log.includes('could not resolve host')&& log.includes('done 3 true true true');if (ok) { console.log('PASS refused, https refused and unknown host are caught'); process.exit(0); }console.log(`FAIL exit ${r.status}\n` + log.slice(-1500));process.exit(1);
Branches
Latest commits
- ca3b4959Re-vendor complete Hybriel plugins and runtime to day44mre
- df9e7df9Last-item checks run in the browser gate (components#26 fixed on day41); media-player loop is a plain Booleanmre
- 895a5afcRe-vendor complete Hybriel plugins and runtime to day41mre
- 16006bb3Backup tar: --hard-dereference, so mpackdb sidecars are never stored as hard links (Tracker's finding)mre
- 88397fc3Re-vendor complete Hybriel plugins and runtime to day39mre
- 9b872cedRecord IC28 deployment and live icon verificationmre
- 46fefaa7Count the icons entry in the offline home-page checkmre
- c7e14cabRecord IC28 rerun and unchanged-main baseline comparisonmre
- 5e090ffdRecord IC28 review evidence and gate resultsmre
- adfe2c4dAdd shuffle, repeat and repeatOne shared iconsmre
- c96709c8media-player: skip = false and repeat = 'one' options (jukebox#19)mre
- bd4aa808Record VL24 deployment and live verificationmre
- e5b98ecfRun virtual-list gate before deploymentmre
- 2e9b4a8evirtual-list: into main, with centerId and scrollTop/onScroll (jukebox#20)mre
- 69954249Align all plugin sources with Hybriel day38bmre
- f740f666Re-vendor components to Hybriel set day38bmre
- 8176eb14Record CS23b deployment and live verificationmre
- 84e3ddaaRemove blank line before pagination Style closing bracemre
- a92298ddRecord exact CSS and same-date proof after specificity reviewmre
- c71a0abePreserve consumer theme specificity with nested tag rulesmre