openpencil/tests/engine/tools/registry.test.ts
Danila Poyarkov 9e4d7bee5d chore(lint): fix unused test code
- Remove stale imports and unused locals from split engine and e2e tests
- Drop the targeted no-unused-vars test allowances
- Keep check and affected test suites warning-free
2026-05-06 02:53:19 +03:00

29 lines
815 B
TypeScript

import { describe, expect, test } from 'bun:test'
import { ALL_TOOLS } from '#tests/helpers/tools'
describe('tool definitions', () => {
test('all tools have unique names', () => {
const names = ALL_TOOLS.map((t) => t.name)
expect(new Set(names).size).toBe(names.length)
})
test('all tools have description and params', () => {
for (const t of ALL_TOOLS) {
expect(t.name).toBeTruthy()
expect(t.description).toBeTruthy()
expect(typeof t.params).toBe('object')
expect(typeof t.execute).toBe('function')
}
})
test('required params are marked', () => {
for (const t of ALL_TOOLS) {
for (const param of Object.values(t.params)) {
expect(typeof param.type).toBe('string')
expect(typeof param.description).toBe('string')
}
}
})
})