// A6: the review by the Founder with three test users. The record lives in docs/review-record.json.
// While founderSignedOff is false the check is todo; setting it to true (one line) turns it into a real check.
import test from 'node:test';
import assert from 'node:assert/strict';
import { readFileSync } from 'node:fs';
const rec = JSON.parse(readFileSync(new URL('../docs/review-record.json', import.meta.url), 'utf8'));
test('A6 review record is well formed (three testers, script tasks 1 to 5)', () => {
assert.equal(typeof rec.founderSignedOff, 'boolean');
assert.deepEqual(rec.testers.map((t) => t.id), ['Test user 1', 'Test user 2', 'Test user 3']);
assert.ok(Array.isArray(rec.changes));
});
test('A6 reviewed by the Founder with three test users', { todo: rec.founderSignedOff ? false : 'the Founder review happens at M2: fill docs/review-record.json, then set founderSignedOff to true' }, () => {
assert.ok(typeof rec.founder === 'string' && rec.founder.trim(), 'founder named');
assert.match(String(rec.date), /^\d{4}-\d{2}-\d{2}$/, 'review date');
for (const t of rec.testers) {
assert.deepEqual(t.tasks.map((x) => x.task).sort(), [1, 2, 3, 4, 5], `${t.id} did tasks 1 to 5`);
for (const x of t.tasks) {
assert.equal(typeof x.doneWithoutHelp, 'boolean', `${t.id} task ${x.task} done flag`);
assert.ok(Number.isFinite(x.seconds) && x.seconds > 0, `${t.id} task ${x.task} time`);
if (!x.doneWithoutHelp) {
const c = rec.changes.find((ch) => ch.tester === t.id && ch.task === x.task);
assert.ok(c && c.change, `${t.id} needed help on task ${x.task}: a change must be recorded`);
}
}
}
});
agentgate-source: code mirror on Cloudflare Pages. All repos