@@ -84,15 +84,15 @@ spec = parallel $ do
8484
8585 it " throws on blank input" $ do
8686 h <- openFileForReading " test/fixtures/cli/blank.json"
87- readBlobPairsFromHandle h `shouldThrow` ( == ExitFailure 1 )
87+ readBlobPairsFromHandle h `shouldThrow` jsonException
8888
8989 it " throws if language field not given" $ do
9090 h <- openFileForReading " test/fixtures/cli/diff-no-language.json"
91- readBlobsFromHandle h `shouldThrow` ( == ExitFailure 1 )
91+ readBlobsFromHandle h `shouldThrow` jsonException
9292
9393 it " throws if null on before and after" $ do
9494 h <- openFileForReading " test/fixtures/cli/diff-null-both-sides.json"
95- readBlobPairsFromHandle h `shouldThrow` ( == ExitFailure 1 )
95+ readBlobPairsFromHandle h `shouldThrow` jsonException
9696
9797 describe " readBlobsFromHandle" $ do
9898 it " returns blobs for valid JSON encoded parse input" $ do
@@ -103,9 +103,13 @@ spec = parallel $ do
103103
104104 it " throws on blank input" $ do
105105 h <- openFileForReading " test/fixtures/cli/blank.json"
106- readBlobsFromHandle h `shouldThrow` ( == ExitFailure 1 )
106+ readBlobsFromHandle h `shouldThrow` jsonException
107107
108108 where blobsFromFilePath path = do
109109 h <- openFileForReading path
110110 blobs <- readBlobPairsFromHandle h
111111 pure blobs
112+
113+ jsonException :: Selector InvalidJSONException
114+ jsonException = const True
115+
0 commit comments