Baseline commit of the existing Maquina Comercial Pessoal project
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.
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
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/);
|
||||
});
|
||||
Reference in New Issue
Block a user