Skip to content

Conversation

@jqsilver
Copy link
Contributor

Summary

Avoid forced try! and instead make test methods throws.

Reasoning

XCTest and Swift Testing handle thrown errors if the test method is marked as throwing. try! is especially bad since it crashes the test, and we have a new formatting rule for it.

@jqsilver jqsilver force-pushed the ab-throwing-tests branch from 082ec0a to e46f99c Compare June 11, 2025 22:54
Copy link
Member

@calda calda left a comment

Choose a reason for hiding this comment

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

awesome!

@jqsilver jqsilver force-pushed the ab-throwing-tests branch from e46f99c to cc20ae0 Compare June 13, 2025 18:28
@jqsilver jqsilver force-pushed the ab-throwing-tests branch from cc20ae0 to 3966132 Compare June 13, 2025 18:32
@calda calda merged commit c6a27a6 into airbnb:master Jun 13, 2025
4 checks passed
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.

2 participants