markdalgleish / static-site-generator-webpack-plugin

Minimal, unopinionated static site generator powered by webpack
MIT License
1.61k stars 97 forks source link

Implement snapshot testing #124

Closed jahredhope closed 6 years ago

jahredhope commented 6 years ago

The current tests are thorough and allow the easy development of new features whilst maintaining confidence that other use-cases haven't broken. However they can take some time to update, and it's not always obvious what has changed.

Currently the test suite uses a folder comparison tool to assert the result of the automated tests. To update the tests the tests are ran and the actual results are copied to the expected results.

This test update model process closely models snapshot testing, and could be automated using Jest Snapshot Test.

This would allow tests to be updated with single command. Additionally it would improve the readability of errors in the test results.

jahredhope commented 6 years ago

Closed by #125