preactjs / compressed-size-action

GitHub Action that adds compressed size changes to your PRs.
https://github.com/marketplace/actions/compressed-size-action
MIT License
602 stars 84 forks source link

Add utility tests and minimumChangeThreshold option #21

Closed dstaley closed 4 years ago

dstaley commented 4 years ago

This PR adds Jest tests for the utility functions that don't communicate with GitHub. These functions were moved to their own module, utils.js.

I've also added a new configuration option minimum-change-threshold. Any files that have a delta beneath this value will be considered unchanged. The original default of 1 byte has been retained.

This doesn't make any modifications to the comment logic. I figure we can hash that out in a separate PR.

If desired, I can also add a workflow to run the tests on pull requests. Just let me know if you'd like that!

developit commented 4 years ago

Released as v2 (v2.0.1).