or asynchronously.
  expect(resolvedValue).toBeUndefined();

  // Propagate promise resolution to &#39;then&#39; functions using $apply().
  $rootScope.$apply();
  expect(resolvedValue).toEqual(123);
}));
</code></pre>
</li>
</ul>

</div>




<div>
  
  <h2 id="dependencies">Dependencies</h2>
  <ul>
    <li><a href="api/ng/service/$rootScope"><code>$rootScope</code></a></li>
  </ul>
  

    

  <h2 id="usage">Usage</h2>
    
      <p><code>$q(resolver);</code></p>


    

    
<section class="api-section">
