Enhance CI configuration and documentation; add new action palette adapter
Some checks failed
CI / validate (push) Has been cancelled

This commit is contained in:
isopropilick
2026-09-15 10:32:11 -06:00
parent 896c3a121a
commit 29899223e4
12 changed files with 296 additions and 11 deletions

View File

@@ -0,0 +1,24 @@
import assert from 'node:assert/strict';
import test from 'node:test';
import { executeAndReport } from '../../scripts/run-profile.mjs';
test('builds the report after both passing and failing runs, preserving runner status', async () => {
for (const code of [0, 1, 7]) {
const events = [];
const result = await executeAndReport(async () => { events.push('runner'); return code; }, async () => { events.push('report'); });
assert.equal(result, code);
assert.deepEqual(events, ['runner', 'report']);
}
});
test('attempts reporting after runner startup failure', async () => {
let reported = false;
assert.equal(await executeAndReport(async () => { throw new Error('spawn failed'); }, () => { reported = true; }), 1);
assert.ok(reported);
});
test('a report failure cannot convert a failed runner to success or hide its exit code', async () => {
for (const code of [0, 7]) {
assert.equal(await executeAndReport(async () => code, () => { throw new Error('unwritable report'); }), code || 1);
}
});