Some checks are pending
offline / test (push) Waiting to run
Persist account-balance books; edge caches prepaid from books. Add zappier-identity, verae-nats-accounts, verae-jobs-events, verae-access-staff, zapier-decisions. Edge binds loopback; lan-134 stays off; HTTP services prefer local spawn.
23 lines
731 B
JavaScript
23 lines
731 B
JavaScript
import { test } from 'node:test';
|
|
import assert from 'node:assert/strict';
|
|
import { spawn } from 'node:child_process';
|
|
import path from 'node:path';
|
|
import { fileURLToPath } from 'node:url';
|
|
|
|
const root = path.join(path.dirname(fileURLToPath(import.meta.url)), '..');
|
|
|
|
test('jobs-events health', async () => {
|
|
const port = 18030;
|
|
const child = spawn(process.execPath, ['src/server.js'], {
|
|
cwd: root,
|
|
env: { ...process.env, PORT: String(port) },
|
|
stdio: ['ignore', 'pipe', 'pipe'],
|
|
});
|
|
await new Promise((r) => setTimeout(r, 400));
|
|
try {
|
|
const h = await (await fetch(`http://127.0.0.1:${port}/health`)).json();
|
|
assert.equal(h.role, 'verae-jobs-events');
|
|
} finally {
|
|
child.kill('SIGTERM');
|
|
}
|
|
});
|