The latest version of hspec-expectations-json is 1.0.2.1-0.

hspec-expectations-json

Version 1.0.0.2 revision 0 uploaded by PatrickBrisbin.

Package meta

Synopsis
Hspec expectations for JSON Values
Description

Hspec expectations for JSON Values

Comparing JSON Values in Haskell tests comes with some challenges:

  • In API responses, additive changes are typically safe and an important way to evolve responses without breaking clients. Therefore, assertions against such responses often want to ignore any unexpected keys in Objects (at any depth), as any clients would.

  • Order often doesn't matter in API responses either, so it should be possible to assert equality regardless of Array ordering (again, at any depth).

  • When an assertion fails, showing the difference clearly needs to take the above into account (i.e. it can't show keys you've ignored, or ordering differences you didn't care about), and it has to display things clearly, e.g. as a diff.

This library handles all these things.

Author
Freckle Engineering
Bug reports
https://github.com/freckle/hspec-expectations-json/issues
Category
Test
Copyright
2020 Freckle Education
Homepage
https://github.com/freckle/hspec-expectations-json#readme
Maintainer
engineering@freckle.com
Package URL
n/a
Stability
n/a

Components