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

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