Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite view tests using snapshots #45

Closed
julen opened this issue Oct 14, 2016 · 0 comments
Closed

Rewrite view tests using snapshots #45

julen opened this issue Oct 14, 2016 · 0 comments
Assignees

Comments

@julen
Copy link
Contributor

julen commented Oct 14, 2016

In #37 we had to remove view tests that checked the context being rendered because they were basically duplicating application code and their usefulness is rather questionable.

Instead of this, we will rather use snapshot testing: take a snapshot of the rendered/returned context and store it in a file, serialized. This human-readable output will be checked by developers for validity and it will be committed to version control. Test runs will read from the snapshot file and compare it to the output provided by the view being tested.

Changes in view contexts/payloads mean the snapshot files need to be reviewed and updated too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant