thegazelle-ad / gazelle-server

Server for front-end and editor tools of The Gazelle
MIT License
19 stars 8 forks source link

Fix saving without authors #405

Closed emilgoldsmith closed 6 years ago

emilgoldsmith commented 6 years ago

I wanted to stick to writing regression tests for all bugs we fix, so I did a refactor to make some pure functions that are more easily testable, I'll comment where the actual change is.

I actually really like this structure of my refactor, think we should do more of it, trying to isolate all the side effects in a few functions and then extract all the pure logic behaviour out into separate functions that are easily unit testable

emilgoldsmith commented 6 years ago

Also, this kind of coding and API is making me think that it might actually be worth adding Typescript incrementally, it would be really helpful for stuff like this, think I may actually do that