stylish-haskell icon indicating copy to clipboard operation
stylish-haskell copied to clipboard

Provide mechanism for golden tests

Open EncodePanda opened this issue 5 years ago • 1 comments

In order to easier maintain the project we should consider providing golden test mechanism.

Proposal

  1. there would be dedicated golden folder in tests
  2. in that folder for each feature you are trying to test you would provide:
  • featurename-input.hs
  • featurename-output.hs
  • featurename-config.yaml
  1. The mechanism would run stylish-haskell against provided input file and configuration and compare . results with output file

Benefits:

  1. This should simplify testing process (matter of adding yet another golden test)
  2. We could expect community to attach golden files whenever they are requesting a feature or informing about a bug ("this is the source that i have, this is the output i would like to see"). Issue than would not be considered resolved until the golden test provided is not added to golden folder and that test is not passing

EncodePanda avatar Jan 23 '20 22:01 EncodePanda

Very much in favor!

jaspervdj avatar Jan 24 '20 09:01 jaspervdj