checkpoint: pre-split branch cleanup
This commit is contained in:
parent
4c2ae2e5b7
commit
b5db7a7753
276 changed files with 35912 additions and 60119 deletions
24
skills/beadboard-driver/tests/diagnose-env.contract.test.mjs
Normal file
24
skills/beadboard-driver/tests/diagnose-env.contract.test.mjs
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
import test from 'node:test';
|
||||
import assert from 'node:assert/strict';
|
||||
import path from 'node:path';
|
||||
import { execFile } from 'node:child_process';
|
||||
import { promisify } from 'node:util';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
|
||||
const execFileAsync = promisify(execFile);
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = path.dirname(__filename);
|
||||
const scriptPath = path.resolve(__dirname, '..', 'scripts', 'diagnose-env.mjs');
|
||||
|
||||
test('diagnose-env contract: returns stable schema', async () => {
|
||||
const { stdout } = await execFileAsync(process.execPath, [scriptPath], {
|
||||
env: { ...process.env, PATH: '' },
|
||||
});
|
||||
const result = JSON.parse(stdout);
|
||||
|
||||
assert.equal(typeof result.ok, 'boolean');
|
||||
assert.equal(typeof result.timestamp, 'string');
|
||||
assert.equal(result.environment !== null, true);
|
||||
assert.equal(Array.isArray(result.findings), true);
|
||||
assert.equal(Array.isArray(result.recommendations), true);
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue