Open eviltofu opened 2 years ago
- Passed from one coordinator to another instead of just creating it on the coordinator's init method
Definitely. We have removed many of these. But appears to have come back. Maybe a PR to get rid of these first? Might involve a number of files.
- Have it's own namespace for uiTesting (perhaps by adding ui-testing in front of the UserDefault keys.
Since Config
mostly reads from UserDefaults
[^1], maybe it's easier to just add a initializer init(defaults: UserDefaults)
, change Config
to use it and pass in a different UserDefaults
instance for tests?
[^1]: we should probably see if we can fix any values that aren't.
Actually, we are already halfway there: https://github.com/AlphaWallet/alpha-wallet-ios/blob/c98072d2771fe4f3d277c2e7e9a07916470a3663/AlphaWalletTests/Factories/Config.swift#L7
Maybe it's the static functions in Config
which are the problem
@eviltofu do you have enough feedback from me?
Config
needs to be able toui-testing
in front of theUserDefault
keys.init
method.