In my current pr #438, I started by trying to improve test coverage for the prompt.js file, as the prompts were broken. But this mean i had to make some updates elsewhere as I discovered some bugs.
We also need tests for addContribution. To avoid making that pr huge, let's add the next set of tests (which will require mocks) in a new pr.