describe('beam.constants', function()
  local constants

  before_each(function()
    constants = require('beam.constants')
  end)

  describe('Visual feedback constants', function()
    it('should have valid visual feedback duration', function()
      assert.is_number(constants.VISUAL_FEEDBACK_DURATION)
      assert.is_true(constants.VISUAL_FEEDBACK_DURATION > 0)
      assert.is_true(constants.VISUAL_FEEDBACK_DURATION <= constants.VISUAL_FEEDBACK_MAX)
    end)

    it('should have valid min and max values', function()
      assert.is_true(constants.VISUAL_FEEDBACK_MIN < constants.VISUAL_FEEDBACK_MAX)
      assert.is_true(constants.VISUAL_FEEDBACK_MIN >= 0)
    end)
  end)

  describe('Operator names', function()
    it('should define all standard operators', function()
      assert.equals('y', constants.OPERATORS.YANK)
      assert.equals('d', constants.OPERATORS.DELETE)
      assert.equals('c', constants.OPERATORS.CHANGE)
      assert.equals('v', constants.OPERATORS.VISUAL)
    end)
  end)

  describe('Mode indicators', function()
    it('should define all vim modes', function()
      assert.equals('n', constants.MODES.NORMAL)
      assert.equals('v', constants.MODES.VISUAL)
      assert.equals('o', constants.MODES.OPERATOR_PENDING)
      assert.equals('i', constants.MODES.INSERT)
    end)
  end)

  describe('Text object types', function()
    it('should define standard text object prefixes', function()
      assert.equals('i', constants.TEXTOBJ_TYPES.INNER)
      assert.equals('a', constants.TEXTOBJ_TYPES.AROUND)
      assert.equals('t', constants.TEXTOBJ_TYPES.TO)
      assert.equals('f', constants.TEXTOBJ_TYPES.FORWARD)
    end)
  end)

  describe('Error messages', function()
    it('should provide user-friendly error messages', function()
      assert.is_string(constants.ERRORS.NO_PATTERN)
      assert.is_string(constants.ERRORS.NO_TEXTOBJ)
      assert.is_string(constants.ERRORS.NO_ACTION)
      assert.is_string(constants.ERRORS.INVALID_BUFFER)
      assert.is_string(constants.ERRORS.OPERATION_FAILED)
    end)
  end)
end)
