feat(backends): support explicit backends.default selection
This commit is contained in:
@@ -52,4 +52,20 @@ describe('createConfiguredExternalBackend', () => {
|
||||
expect(configured.backends.codex?.name).toBe('codex');
|
||||
expect(configured.backends.gemini?.name).toBe('gemini');
|
||||
});
|
||||
|
||||
it('honors backends.default when that backend is enabled', () => {
|
||||
const cfg = {
|
||||
...base,
|
||||
backends: {
|
||||
...base.backends,
|
||||
default: 'gemini' as const,
|
||||
codex: { enabled: true, path: '/usr/bin/codex', args: [], timeout_ms: 120000 },
|
||||
gemini: { enabled: true, path: '/usr/bin/gemini', args: [], timeout_ms: 120000 },
|
||||
},
|
||||
};
|
||||
const configured = createConfiguredExternalBackends(cfg);
|
||||
expect(configured.defaultName).toBe('gemini');
|
||||
expect(configured.backends.codex?.name).toBe('codex');
|
||||
expect(configured.backends.gemini?.name).toBe('gemini');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user