Can testcafe afterEach() fixture calls know whether the test passed or not? My Fixture looks like this:
fixture`Admitted: Happy Path`
  .page(environment.admitted)
  .requestHooks(logger)
  .afterEach(logErrors);

logErrors logs all the API errors from that test, however I would only like to log them if the test failed.  Is there a way to tell if the test that just finished succeeded in fixture.afterEach()?

I've provided several approaches to solve this issue in the following question.
Please refer to it.