import { describe, expect, it } from 'bun:test'
import { isEnabledInAgentConfig } from './agentConfig.js'

describe('schedule-tool isEnabledInAgentConfig', () => {
  it('识别 ScheduleTool 与 *', () => {
    expect(isEnabledInAgentConfig({ tools: ['ScheduleTool'] })).toBe(true)
    expect(isEnabledInAgentConfig({ tools: ['*'] })).toBe(true)
    expect(isEnabledInAgentConfig({ tools: ['CodeTool'] })).toBe(false)
    expect(
      isEnabledInAgentConfig({
        tools: ['*'],
        disallowedTools: ['ScheduleTool'],
      }),
    ).toBe(false)
  })
})
