SparkPost / heml

HEML is an open source markup language for building responsive email.
https://heml.io
MIT License
4.33k stars 157 forks source link

Snapshot integration testing #31

Closed colestrode closed 6 years ago

colestrode commented 6 years ago

This PR adds a framework for performing integration style tests against the heml output.

Test fixtures should be in the test/__fixtures__ directory (which mirrors the Jest created test/__snapshots__ directory). Each fixture file should export a string representing a heml email template. Each template will be processed by heml and the result will be asserted against a snapshot that includes the html, metadata, and errors (and any future properties that are generated by heml).

Adding new tests should be as easy as adding a new fixture file and updating the snapshots with npm test -- -u.