I tried to change something in this module, but immediately all of the tests were failing. The main problem was that exec.getCall(x) is used a lot, which needs to be updated everywhere when something is added.
To make it easier to change things in the module, but still have strict testing I changed one of the tests to using jest snapshot testing. This way tests can be easily updated with npm test -- -u but it's also easy to review changes.
Additionally I refactored the test a bit, but that's not necessary for adapting the snapshot tests 😉
Hey,
I tried to change something in this module, but immediately all of the tests were failing. The main problem was that
exec.getCall(x)
is used a lot, which needs to be updated everywhere when something is added.To make it easier to change things in the module, but still have strict testing I changed one of the tests to using jest snapshot testing. This way tests can be easily updated with
npm test -- -u
but it's also easy to review changes.Additionally I refactored the test a bit, but that's not necessary for adapting the snapshot tests 😉
Best, Finn