chyingp / grunt-inline

Brings externally referenced resources, such as js, css and images, into a single file.
MIT License
87 stars 55 forks source link

refactor tests #77

Open tenaciousRas opened 7 years ago

tenaciousRas commented 7 years ago

Expected: Project is written with testable code that doesn't require integration test that use file-comparison (which is very brittle) to validate regex. For example, in inline.js, isolate all methods that match on regex whenever possible, and unit test them with minimal dependencies that can be injected if necessary.

Actual: "grunt test" uses integration tests as a way to validate regex matching. This is a poor practice. It's up to you to ask a project contributor how to de-couple the dependencies and write better tests.

versions: