-
Notifications
You must be signed in to change notification settings - Fork 0
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
Use savePost
in golden tests
#20
Comments
tasty-mgolden is absent from LTS-6.9 that we currently use. If we add it as an extra-package, we run into problems with dependencies:
Let's postpone migrating to tasty-mgolden, then. |
Actually, this is impossible to implement, since Let's close this for now. If dependence on external types cause us too much grief, we can revisit this issue. |
I'm currently working on #15, and after moving to a new version, golden tests for Wordpress no longer pass since the internal representation of external types changed. This made me realize that my above comment draws a false dichotomy: we can test both |
I wrote golden tests for
Hakyll.Convert.Blogger.readPosts
andWordpress.readPosts
. They rely on aShow
instance for types that represent a post. The default implementation prints everything out in a single line, so when a test fails, it's quite hard to see what exactly the difference is.Furthermore, Wordpress posts are represented by a type defined in an external library. Depending on its
Show
instance for testing is probably a bad idea.These tests should be rewritten with
savePost
, which is our function. That will lean them towards integration testing, which is fine. We can then use tasty-mgolden to provide us with nice diffs on test failures.Blocked on #19.
The text was updated successfully, but these errors were encountered: