/** * A non-idempotent accumulator WITHOUT expectNonIdempotent. The detected * violation must FAIL the test (the long-standing default behavior). */ import { computed, pattern, Writable } from "commonfabric"; export default pattern(() => { const value = new Writable("hello"); const log = new Writable([]); // Non-idempotent: appends to log on every re-execution computed(() => { const current = log.get(); log.set([...current, `${value.get()} at run #${current.length + 1}`]); }); const hasEntries = computed(() => log.get().length > 0); return { tests: [{ assertion: hasEntries }], }; });