moving
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import {
|
||||
buildHookBridgeOptions,
|
||||
parseHookArgs,
|
||||
pickStringField,
|
||||
pickStringFromObject,
|
||||
@@ -61,6 +62,27 @@ describe('parseHookArgs', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('buildHookBridgeOptions', () => {
|
||||
it('keeps lifecycle CLI work single-attempt and inside a 5s host budget', () => {
|
||||
const logger = makeMockLogger();
|
||||
expect(buildHookBridgeOptions(logger, 'C:\\Program Files\\Hive Mind\\cli.js')).toEqual({
|
||||
logger,
|
||||
cli_path: 'C:\\Program Files\\Hive Mind\\cli.js',
|
||||
timeout_ms: 2_500,
|
||||
max_retries: 0,
|
||||
});
|
||||
});
|
||||
|
||||
it('omits cli_path when the installer did not pin one', () => {
|
||||
const logger = makeMockLogger();
|
||||
expect(buildHookBridgeOptions(logger)).toEqual({
|
||||
logger,
|
||||
timeout_ms: 2_500,
|
||||
max_retries: 0,
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('pickStringField / pickStringFromObject', () => {
|
||||
it('returns the first non-empty string match', () => {
|
||||
expect(pickStringField({ a: 'x', b: 'y' }, 'a', 'b')).toBe('x');
|
||||
|
||||
Reference in New Issue
Block a user