It can be useful to assert again LocalizedStringKey in unit tests. Sometimes there is significant logic that goes into constructing a localized string and so it’s good to be able to write tests against that.
However, as soon as you apply some formatting to a string it seems to break equatability:
LocalizedStringKey("\(1)") == LocalizedStringKey("\(1)") // false
That is false when it seems reasonable that it would be true.
Ideally not only would that work, but you should also be able to test a non-formatted string against a formatted string so that you can verify that your logic executed correctly:
LocalizedStringKey("1") == LocalizedStringKey("\(1)") // false
But that is false too.