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
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=jsonis broken, with no test end information nor any "done" event emitted.Worse, if the
exitdidexit(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 testwould stop with a specific non-null exit code