Skip to content

Improve error shown when tests finishes while throwsAsync / notThrowsAsync assertions remain pending #2245

@OmgImAlexis

Description

@OmgImAlexis

Description

Currently when you run a test with a non-awaited t.throwsAsync the only error shown is Error: Test finished, but an assertion is still pending. I'd love to see something similar to the TypeError thrown for todo tests that have an implementation.

Test Source

t.throwsAsync(async () => {
	await parseDomain();
}, 'Type must be one of [id,uuid,name], undefined given.');

Error Message & Stack Trace

  1 test failed [13:01:49]
  1 previous failure in test files that were not rerun

  parse-domain › allows lookup via name, id and uuid


  Error: Test finished, but an assertion is still pending

  Type `r` and press enter to rerun tests
  Type `u` and press enter to update snapshots

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions