Skip to content

feat: Add the ability to disable test failures on report issue #146

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

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

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

Successfully merging this pull request may close these issues.

Cannot disable test failure behaviour
2 participants