     $input = $('#name')
 
   describe 'text()', ->
+    it 'should return undefined for a non existing element', ->
+      expect($('#noexists').text()).toEqual(undefined)
+
+    it 'should not fail when called on an empty set', ->
+      expect(-> $('#noexists').text()).not.toThrow()
+
     it 'should return the textContent of an element', ->
       expect($li_first.text()).toEqual('uno')
 

      expect($li_first.text()).toEqual('one')

  describe 'html()', ->
    it 'should return the innerHTML of an element', ->
      html = document.getElementById('second').innerHTML
      expect($li_second.html()).toEqual(html)

      $li_second.addClass('dos two due')
      expect(getClass($li_second)).toEqual(['dos', 'two', 'due'])

    it 'should not fail when calling without arguments', ->
      expect(-> $li_second.addClass()).not.toThrow()

    it 'should not fail when calling empty string', ->
      expect(-> $li_second.addClass('')).not.toThrow()

  describe 'removeClass()', ->
    it 'should not fail when called on an empty set', ->
      expect(-> $('#noexists').removeClass('noexists')).not.toThrow()

    it 'should remove a class from an element', ->
      $li_first.removeClass('uno')
      expect(getClass($li_first)).toEqual(['first', 'active'])
