P6.7 converted test/basic/. Convert test/edge/ and test/integration/ the same way: describe/it/expect → test/assert. No behavioural change. 5 / 5 tests pass. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
24 lines
801 B
JavaScript
24 lines
801 B
JavaScript
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 dashboardAPI', () => {
|
|
for (const file of ['README.md', 'basic.flow.json', 'integration.flow.json', 'edge.flow.json']) {
|
|
assert.ok(fs.existsSync(path.join(dir, file)), `missing ${file}`);
|
|
}
|
|
});
|
|
|
|
test('example flows are parseable arrays for dashboardAPI', () => {
|
|
for (const file of ['basic.flow.json', 'integration.flow.json', 'edge.flow.json']) {
|
|
const parsed = loadJson(file);
|
|
assert.ok(Array.isArray(parsed), `${file} is not an array`);
|
|
}
|
|
});
|