sydtest-aeson 0.2.0.0 → 0.2.0.1
raw patch · 2 files changed
+16/−16 lines, 2 filesdep ~sydtestPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: sydtest
API changes (from Hackage documentation)
Files
- src/Test/Syd/Aeson.hs +14/−14
- sydtest-aeson.cabal +2/−2
src/Test/Syd/Aeson.hs view
@@ -41,17 +41,16 @@ ensureDir (parent p) SB.writeFile (fromAbsFile p) $ LB.toStrict $ JSON.encodePretty value, goldenTestCompare = \actual expected ->- pure $- if actual == expected- then Nothing- else+ if actual == expected+ then pure Nothing+ else do+ assertion <-+ textsNotEqualButShouldHaveBeenEqual+ (TE.decodeUtf8 (LB.toStrict (JSON.encodePretty actual)))+ (TE.decodeUtf8 (LB.toStrict (JSON.encodePretty expected)))+ pure $ Just- ( Context- ( textsNotEqualButShouldHaveBeenEqual- (TE.decodeUtf8 (LB.toStrict (JSON.encodePretty actual)))- (TE.decodeUtf8 (LB.toStrict (JSON.encodePretty expected)))- )- (goldenContext fp)+ ( Context assertion (goldenContext fp) ) } @@ -83,10 +82,11 @@ ensureDir (parent p) SB.writeFile (fromAbsFile p) $ LB.toStrict $ JSON.encodePretty value, goldenTestCompare = \actual expected ->- pure $- if actual == expected- then Nothing- else Just (Context (stringsNotEqualButShouldHaveBeenEqual (ppShow actual) (ppShow expected)) (goldenContext fp))+ if actual == expected+ then pure Nothing+ else do+ assertion <- stringsNotEqualButShouldHaveBeenEqual (ppShow actual) (ppShow expected)+ pure $ Just (Context assertion (goldenContext fp)) } -- | Test that the given 'JSON.Value' is the same as what we find in the given golden file.
sydtest-aeson.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack name: sydtest-aeson-version: 0.2.0.0+version: 0.2.0.1 synopsis: An aeson companion library for sydtest category: Testing homepage: https://github.com/NorfairKing/sydtest#readme@@ -42,7 +42,7 @@ , deepseq , path , path-io- , sydtest >=0.17+ , sydtest >=0.18 , text default-language: Haskell2010