Skip to content

Provide a warning for when a test called exit() #1657

Description

@rrousselGit

I found a weird issue in my tests recently:

In some edge cases, a test could end up calling exit. This had the undesired consequence of stopping tests early with no information whatsoever about what happened.
And of course, --reporter=json is broken, with no test end information nor any "done" event emitted.

Worse, if the exit did exit(0), then CIs may even consider that tests are passing.

I'm not expecting the suite to properly continue, but I wonder if there's a way to gracefully quit.
Ideally, we'd have an error message and dart test would stop with a specific non-null exit code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions