fix(kirocli): harden v2 and v3 hooks
This commit is contained in:
1 parent
5889b09a09
commit
3f43f4aad5
14 files changed
+1466
-597
No files matched your search
@@ -0,0 +1,31 @@
|
||||
import assert from 'node:assert/strict';
|
||||
import test from 'node:test';
|
||||
import {
|
||||
createFixture,
|
||||
runProcess,
|
||||
} from '../test-support/kirocli-test-helpers.mjs';
|
||||
|
||||
test('official Kiro CLI 2.13 validates the installed v2 agent contract', {
|
||||
skip: process.env.ELYDORA_KIRO_CLI_BINARY
|
||||
? false
|
||||
: 'set ELYDORA_KIRO_CLI_BINARY to the official Kiro CLI executable',
|
||||
}, async () => {
|
||||
const fixture = await createFixture();
|
||||
try {
|
||||
const install = await fixture.install();
|
||||
assert.equal(install.code, 0, install.stderr);
|
||||
const binary = process.env.ELYDORA_KIRO_CLI_BINARY;
|
||||
const version = await runProcess(binary, ['--version'], {}, fixture.projectDir);
|
||||
assert.equal(version.code, 0, version.stderr);
|
||||
assert.match(version.stdout, /\b2\.13\.\d+\b/);
|
||||
const validation = await runProcess(
|
||||
binary,
|
||||
['agent', 'validate', '--path', fixture.v2Path],
|
||||
{},
|
||||
fixture.projectDir,
|
||||
);
|
||||
assert.equal(validation.code, 0, validation.stderr);
|
||||
} finally {
|
||||
await fixture.close();
|
||||
}
|
||||
});
|
||||
Reference in new issue
Block a user