       changeInputValue element, "f"
       $rootScope.$digest()
 
-      expect($(".mac-menu-item").text()).toBe "foo"
+      expect(document.querySelector(".mac-menu-item").innerText).toBe "foo"
 
     it "should use a callback function returned by an invoked function", ->
       $rootScope.source = (val) ->


      $timeout.flush()

      menuEl = $(".mac-menu")

      expect(menuEl.hasClass "test").toBeTruthy()
      expect(menuEl.hasClass "hello").toBeFalsy()

    it "should not have ng-class on menu element", ->
      $rootScope.source  = data

      $rootScope.$digest()

      changeInputValue element, "f"
      expect(document.querySelector(".mac-menu-item").innerText).toBe "foo"

    it "should use a url string and work exactly like mac-autocomplete-url", ->
      $httpBackend.when("GET", "/api/autocomplete?q=f").respond({data})
