title: How to get full stack trace in Test Cafe errors
body: <p>I have been using Test Cafe to write an internal test framework where actions (t.click) and assertions (t.expect) are not directly written inside the spec, but are defined and aggregated in other files.</p>
  
  <p>Everything cool until a test does not fail: in this case the Test Cafe reporter writes in console the assertion/action failed and the relative snippet of code, but I did not find the way to understand the full stack trace of function calls from my test down to the failed assertions.</p>
  
  <p>How can I make sure to provide a full stack trace in the reporter, logging a stack trace with all the calls to function that made my test fail?</p>
  
  <p>I understood that the reason should be linked to how <a href="https://github.com/nodejs/node/issues/11865" rel="nofollow noreferrer">async/await is transpiled into generators</a>: the stack trace of the error shows only the last await executed and not all the previous calls.</p>
  
  <pre><code>&lt;section&gt; ... &lt;/section&gt;
  &lt;section class="section--modifier"&gt;
    &lt;h1&gt; ... &lt;/h1&gt;
    &lt;div&gt;
      ...
      &lt;button class="section__button"&gt;
        &lt;div class="button__label"&gt;
          &lt;span class="label__text"&gt;Hello!&lt;/span&gt; &lt;-- Target of my test
        &lt;/div&gt;
      &lt;/button&gt;
      ...
    &lt;/div&gt;
  &lt;/section&gt;
  &lt;section&gt; ... &lt;/section&gt;
  </code></pre>
  
  <pre><code>// 
  // My spec file
  //
  import { Selector } from 'testcafe';
  
  import {
    verifyButtonColor
  } from './button';
  
  fixture`My Fixture`
    .page`....`;
  
  test('Test my section', async (t) =&gt; {
    const MySection = Selector('.section--modifier');
    const MyButton1 = MySection.find('.section__button');
  
    const MySection2 = Selector('.section--modifier2');
    const MyButton2 = MySection2.find('.section__button');
  
    ....
    await verifyButtonColor(t, MyButton1, 'green'); // it will fail!
    ....
    ....
    ....
    await verifyButtonColor(t, MyButton2, 'green');
  });
  </code></pre>
  
  <pre><code>//
  // Definition of assertion verifyButtonColor (button.js)
  //
  import { Selector } from 'testcafe';
  
  import {
    verifyLabelColor
  } from './label';
  
  export async function verifyButtonColor(t, node, expectedColor) {
     const MyLabel = node.find('.button__label');
     await verifyLabelColor(t, MyLabel, expectedColor);
  }
  </code></pre>
  
  <pre><code>// 
  // Definition of assertion verifyLabelColor (label.js)
  //
  export async function verifyLabelColor(t, node, expectedColor) {
     const MyText= node.find('.label__text');
     const color = await MyText.getStyleProperty('color');
  
     await t.expect(color).eql(expectedColor, `Color should be ${expectedColor}, found ${color}`); // &lt;-- it will FAIL!
  }
  </code></pre>
  
  <p>What I get not in the reporter is that my test failed because the assertion defined in "verifyLabelColor" failed (the color is not green :(), </p>
  
  <pre><code>...
  await t.expect(color).eql(expectedColor, `Color should be ${expectedColor}, found ${color}`);
  ...
  </code></pre>
  
  <p>but in the reporter I have no evidence that failed due to the following stack of calls</p>
  
  <pre><code>- await verifyButtonColor(t, MyButton1, 'green');
  - await verifyLabelColor(t, MyLabel, expectedColor);
  - await t.expect(color).eql(expectedColor, `Color should be ${expectedColor}, found ${color}`);
  </code></pre>
  
  <p>Any body faced a similar problem?</p>
  
  <p>An alternative could be to log the "path" of the selector that caused the failure, but looking to Test Cafe documentation I did not find the possibility to do it: knowing that the assertion failed on element with the path below could at least help to understand what went wrong</p>
  
  <pre><code>.section--modifier .section__button .button__label .label__text
  </code></pre>