title: chai-as-promised tests don't work with $q promises
body: <p>I'm trying to get <code>chai-as-promised</code> to work with <code>$q</code> promises with karma unit tests.</p>
  
  <pre><code>  svc.test = function(foo){
      if (!foo){
        // return Promise.reject(new Error('foo is required'));
        return $q.reject(new Error('foo is required'));
      } else {
        // get data via ajax here
        return $q.resolve({});
      }
    };
  
  
    it.only('should error on no foo', function(){
      var resolvedValue = MyServices.test();
      $rootScope.$apply();
      return resolvedValue.should.eventually.be.rejectedWith(TypeError, 'foo is required');
    });
  </code></pre>
  
  <p>The unit test just times out. I am not sure what I'm doing wrong here to get the promise to resolve properly. It seems to be an issue with using <code>$q</code> -- when I use native <code>Promise.reject()</code> it works fine.</p>
  
  <p>I filed a ticket here, but nobody seems to be responding:
  <a href="https://github.com/domenic/chai-as-promised/issues/150">https://github.com/domenic/chai-as-promised/issues/150</a></p>