-
Notifications
You must be signed in to change notification settings - Fork 10
Description
HI guys,
My snapshot-tests especially but also unit tests rely somewhat on proper non-empty strings being used when running the tests targets. When the app code accesses the static tr/lo variable an empty Localizations object is returned, which causes my snapshots to render empty string and also unit tests which rely on a piece of state which uses strings from NStack, e.g. for interpolation, to fail, due to state not working as expected.
I am not sure when an empty Localizations()-object would be desirable, except if the generated object had default values corresponding to the json it was generated from.
I think we need a way to make the tr/lo variable return an object instantiated from json that we control in order for this to be fully testable. One could always wrap the tr/lo in client code to be able to return a controlled Localizations object, but it would be nicer if this was supported out of the box.
Is something like this in the works? @chriscombs @pbodsk
