maestro/src/engine/tools/index.test.ts
2026-06-03 05:08:00 +00:00

23 lines
935 B
TypeScript

/**
* Smoke tests for the tool catalog aggregator.
*
* Most tool-specific behavior is covered by per-module test files; here
* we just verify that newly-registered modules show up in getToolDefs()
* so a missed `tools/index.ts` wire-up trips on this test (cf. the
* tools-api.ts registration drift documented in docs/maintenance-checklist.md).
*/
import { describe, it, expect } from 'vitest';
import { getToolDefs } from './index.js';
describe('tool catalog', () => {
it('includes SshConsole* tools when piece allows them', async () => {
const defs = await getToolDefs(
['SshConsoleEnsure', 'SshConsoleSend', 'SshConsoleSnapshot'],
false,
);
expect(defs.find((d) => d.function.name === 'SshConsoleEnsure')).toBeDefined();
expect(defs.find((d) => d.function.name === 'SshConsoleSend')).toBeDefined();
expect(defs.find((d) => d.function.name === 'SshConsoleSnapshot')).toBeDefined();
});
});