const test = require('node:test'); const assert = require('node:assert/strict'); const fs = require('node:fs'); const path = require('node:path'); const dir = path.resolve(__dirname, '../../examples'); function loadJson(file) { return JSON.parse(fs.readFileSync(path.join(dir, file), 'utf8')); } test('examples package exists for reactor', () => { for (const file of ['README.md', 'basic.flow.json', 'integration.flow.json', 'edge.flow.json']) { assert.equal(fs.existsSync(path.join(dir, file)), true, file + ' missing'); } }); test('example flows are parseable arrays for reactor', () => { for (const file of ['basic.flow.json', 'integration.flow.json', 'edge.flow.json']) { const parsed = loadJson(file); assert.equal(Array.isArray(parsed), true); } });