Does fakeAsync guarantee promise completion after tick/flushMicroservice
<p>Main issue is how to test that expected actions were performed once a Promise was completed, for example to test if a component correctly updates its states after receiving some remote content.</p>

<p>In the specs below, the <code>dealWithIt()</code> simulates a logic performed in response to a completed promise (it updates variable and trigger "another async event"). </p>

<pre><code>it('Promises fulfilled by flushMicrotasks',fakeAsync((): void =&gt; {

    let x = 1;
    let y = 2;

    let dealWithIt = function(p:Promise&lt;number&gt;) {
        p.then( v =&gt; {
            x = v;
            Promise.resolve(v).then( v=&gt; {y = v+1; });
        });
    };

    let p = Promise.resolve(y);

    dealWithIt(p);

    flushMicrotasks();
    //valid if promise handling completed
    expect(x).toBe(2);
    expect(y).toBe(3);


}));

it('Promises fulfilled by tick',fakeAsync((): void =&gt; {
    let x = 1;
    let y = 2;

    let dealWithIt = function(p:Promise&lt;number&gt;) {
        p.then( v =&gt; {
            x = v;
            Promise.resolve(v).then( v=&gt; {y = v+1; });
        });
    };

    let p = Promise.resolve(y);

    dealWithIt(p);

    tick();
    //valid if promise handling completed

    expect(x).toBe(2);
    expect(y).toBe(3);

}));
</code></pre>

<p>And both tests pass. At the time of checking expectations the promise was dealt with correctly.</p>

<p>But, <strong>is it guaranteed</strong>? Or was I just lucky. </p>

<p>Are there any limitations, will all Promises created in the scope of fakeAsync be 'fired' by calling <code>tick</code> or <code>flushMicrotasks</code>.</p>