DEV Community

Discussion on: Underrated design patterns

Collapse
 
kspeakman profile image
Kasey Speakman • Edited

I don't have an article yet. But I recently posted a gist with a code example. The code fetches AWS Simple System Manager Parameter Store values. Maybe it is terrible. See what you think. Here is the gist.

The upshot is that the update function is pure/deterministic/referentially-transparent and therefore very testable. You can even test that the correct side effects are triggered (without actually running them).