Skip to content

Async uncaught exception not shown in default reporter and has useless stack #511

@sindresorhus

Description

@sindresorhus

With latest master (d51c331).

import test from 'ava';

test.cb(t => {
    setImmediate(() => {
        throw new Error('foo');
        t.end();
    });
});

Default reporter:


  ✖ Test results were not received from test.js

Verbose reporter:

Uncaught Exception: test/stream.js
  Error: foo
    Immediate._onImmediate (stream.js:5:9)



  ✖ Test results were not received from test.js

It should show the uncaught exception in the default reporter and a more useful stack in both.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugcurrent functionality does not work as desiredhelp wanted

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions