import test from 'node:test'; import assert from 'node:assert/strict'; import { readFileSync } from 'node:fs'; const source = readFileSync(new URL('../src/apps/history-writer.mjs', import.meta.url), 'utf8'); test('history writer consumes from beginning so first events on newly-created topics are durable', () => { assert.match(source, /consumer\.subscribe\(\{ topic, fromBeginning: true \}\)/); assert.doesNotMatch(source, /consumer\.subscribe\(\{ topic, fromBeginning: false \}\)/); });