Skip to content

Add example for how to test any error is thrown in the error testing documentation article #853

New issue

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

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

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 13, 2024

Conversation

heckj
Copy link
Member

@heckj heckj commented Dec 11, 2024

I was stumped earlier when trying to find the details for how to test that any error is thrown. This detail is in the migrating from XCTest content, but I landed on this page, and it seemed an odd miss, especially given the history of ignoring the kind of error in many cases. (I found my solution in a post by Jonathan the forums.)

While it is duplicated content, this would have helped me - so I'm proposing it for a documentation update. Happy to edit as y'all see fit.

@heckj heckj changed the title Adds example for the scenario where you don't care (or know) about _what_ error is thrown [docs]: Adds example for how to test any error is thrown in the error testing documentation article Dec 11, 2024
@grynspan grynspan changed the title [docs]: Adds example for how to test any error is thrown in the error testing documentation article Add example for how to test any error is thrown in the error testing documentation article Dec 12, 2024
@grynspan grynspan added documentation 📚 Improvements or additions to documentation enhancement New feature or request labels Dec 12, 2024
@grynspan grynspan added this to the Swift 6.x milestone Dec 12, 2024
@grynspan
Copy link
Contributor

@iamleeg Can you review?

Copy link
Contributor

@stmontgomery stmontgomery left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Approving, but I'll wait a little longer to give @iamleeg an opportunity to review before merging

Copy link
Contributor

@iamleeg iamleeg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a great addition, thank you!

@stmontgomery stmontgomery merged commit 5fd1afa into swiftlang:main Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation 📚 Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants