As extra context.
I realized the test was "wrong", instead of testing
#expect(viewModel.isSavedSearchButtonDisabled)
I needed to test
#expect(viewModel.isSavedSearchButtonDisabled == false)
With this change, the test passed correctly without crashing. This implies that this crash happens on test failures
Also, If I wrote the expectation like
#expect(viewModel.savedSearchState == .active && viewModel.isSavedSearchButtonDisabled)
The test would fail (as per logic), but it wouldn't crash.
huh?
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: