-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpackage.yaml
84 lines (74 loc) · 2 KB
/
package.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: hspec-expectations-json
version: 1.0.2.1
category: Test
author: Freckle Engineering
maintainer: engineering@freckle.com
copyright: 2020 Freckle Education
license: MIT
github: freckle/hspec-expectations-json
synopsis: Hspec expectations for JSON Values
description: |
Hspec expectations for JSON Values
Comparing JSON `Value`s 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 `Object`s (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.
extra-doc-files:
- CHANGELOG.md
- README.md
dependencies:
- base >=4.11 && <5
default-extensions:
- BangPatterns
- DataKinds
- DeriveAnyClass
- DeriveFoldable
- DeriveFunctor
- DeriveGeneric
- DeriveLift
- DeriveTraversable
- DerivingStrategies
- FlexibleContexts
- FlexibleInstances
- GADTs
- GeneralizedNewtypeDeriving
- LambdaCase
- MultiParamTypeClasses
- NoImplicitPrelude
- NoMonomorphismRestriction
- OverloadedStrings
- RankNTypes
- RecordWildCards
- ScopedTypeVariables
- StandaloneDeriving
- TypeApplications
- TypeFamilies
library:
source-dirs: library
dependencies:
- Diff
- HUnit
- aeson
- aeson-pretty
- scientific
- text
- unordered-containers
- vector
tests:
spec:
main: Spec.hs
source-dirs: tests
dependencies:
- aeson
- aeson-qq
- hspec
- hspec-expectations-json
- QuickCheck