Rich-Harris / butternut

The fast, future-friendly minifier
https://butternut.now.sh
MIT License
1.17k stars 17 forks source link

[WIP] check for idempotency #81

Closed Rich-Harris closed 7 years ago

Rich-Harris commented 7 years ago

It seems reasonable to expect that compressing code that's already been compressed (with the same options) should generate the exact same output. This PR checks that that's the case. A couple of tests fail, currently — in one case because it's not removing a side-effect-free expression statement (easily fixed), in another because variables are being mangled in a different order.