jfroelich / rss-reader

A simple Chrome extension for viewing RSS feeds
Other
10 stars 0 forks source link

Review config module design for mockability #790

Closed jfroelich closed 5 years ago

jfroelich commented 5 years ago

Rather than module methods, consider exporting a Config class. This way I can create multiple instances of config, and config is injectable in a more straightforward manner (instead of injecting the module instance we inject the class instance, and thereby more easily mocked in tests.

jfroelich commented 5 years ago

It is less about it being a class or not, and more about it being mockable.