greenkeeperio / greenkeeper-lockfile

:lock: Your lockfile, up to date, all the time
https://greenkeeper.io
183 stars 73 forks source link

use snapshot tests #166

Closed finnp closed 6 years ago

finnp commented 6 years ago

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

Realtin commented 6 years ago

😍

greenkeeperio-bot commented 6 years ago

:tada: This PR is included in version 2.1.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: