Skip to content

Conversation

lukeredpath
Copy link

Adds the ability to disable the current default behaviour of triggering a test failure whenever reportIssue is called in a testing context with a new flag TestContext.emitsFailureOnReportIssue. This value can be overridden for a single operation using the withEmitsFailureOnReportIssue(_) helper function.

Resolves #145.

@adamjcampbell
Copy link

Awesome work, this is needed! I wonder if it'd be better if this behaviour was part of the existing IssueReporters array so that the existing method to disable things via:

withIssueReporters([]) {
  // Reported issues will be ignored here...
}

Would work as per the documentation

This would mean in a testing context IssueReporters.current should return an array including a TestReporter

@stephencelis
Copy link
Member

Sorry for leaving this hanging Luke! We're definitely down for the functionality but as @adamjcampbell mentioned it would be nice for it to be seamlessly integrated into existing APIs. We'll try to get around to thinking more about this soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot disable test failure behaviour
3 participants