Tracks the app that was already in place (capture, treatment, outreach, WhatsApp integration, server, frontend, tests, docs) so future feature work can branch and use isolated worktrees.
18 lines
725 B
JavaScript
18 lines
725 B
JavaScript
import test from 'node:test';
|
|
import assert from 'node:assert/strict';
|
|
import fs from 'node:fs/promises';
|
|
|
|
const source = await fs.readFile(new URL('../launcher/Program.cs', import.meta.url), 'utf8');
|
|
|
|
test('launcher valida APP_PORT como inteiro na faixa TCP com fallback 3910', () => {
|
|
assert.match(source, /int\.TryParse\(port, out parsedPort\)/);
|
|
assert.match(source, /parsedPort\s*<\s*1\s*\|\|\s*parsedPort\s*>\s*65535/);
|
|
assert.match(source, /port\s*=\s*"3910"/);
|
|
});
|
|
|
|
test('launcher exige status 200 e identidade JSON da aplicacao no health', () => {
|
|
assert.match(source, /StreamReader/);
|
|
assert.match(source, /\\"app\\":\\"maquina-comercial-pessoal\\"/);
|
|
assert.match(source, /StatusCode\s*==\s*200/);
|
|
});
|