Skip to content

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

TypeScript
687 B
Raw Blame
import { describe, expect, test, tier } from 'claude-code/testing'

import Policy from '../../hooks/policy'
import Fixtures from '../fixtures'

tier('prepend')

describe('deny-rules-hold', () => {
  test('deny rules hold unless the option is the literal true', () => {
    expect(
      [true, 'true', 1, false, undefined].map(value =>
        Policy.denyRulesHold(Fixtures.overridePolicyOf(value)),
      ),
    ).toEqual([false, true, true, true, true])
  })

  test('settings with no entry for this plugin hold them', () => {
    expect(
      [Fixtures.MANAGED_POLICY, {}, { pluginConfigs: 'x' }].map(
        Policy.denyRulesHold,
      ),
    ).toEqual([true, true, true])
  })
})