6 lines
887 B
JavaScript
6 lines
887 B
JavaScript
import assert from 'node:assert/strict'; import { access, readFile } from 'node:fs/promises'; import test from 'node:test';
|
|
const source=JSON.parse(await readFile(new URL('../json/card_source.json',import.meta.url),'utf8'));
|
|
test('L02 identity and task order are stable',()=>{assert.equal(source.card.number,'02');assert.equal(source.card.uuid,'2e06affe-9ecc-5813-8313-fd7b91744f3b');assert.deepEqual(source.tasks_order,['task01','task02','task03']);});
|
|
test('session, window, pane and persistence evidence are explicit',()=>{const text=JSON.stringify(source);for(const token of ['session','window','pane','reattach','trace.log'])assert.match(text,new RegExp(token,'i'));});
|
|
test('all task sources exist',async()=>{for(const name of ['task01_session_lifecycle','task02_windows_and_panes','task03_detach_attach_state'])await access(new URL(`../src/tasks/${name}.sh`,import.meta.url));});
|