EncodedChatMessage type

This commit is contained in:
spaced4ndy committed 2023-12-21 11:39:20 +04:00
1 parent 2944c1cc28
commit 106916fd29
8 files changed
+25 -26

No files matched your search

+2 -2
View File
@@ -73,10 +73,10 @@ s ==## msg = do
s ##== msg = do
let r = encodeChatMessage msg
case r of
Left e -> expectationFailure $ "encode error: " <> show e
Right encodedBody ->
ECMEncoded encodedBody ->
J.eitherDecodeStrict' (LB.toStrict encodedBody)
`shouldBe` (J.eitherDecodeStrict' s :: Either String J.Value)
ECMLarge -> expectationFailure $ "large message"
(##==##) :: MsgEncodingI e => ByteString -> ChatMessage e -> Expectation
s ##==## msg = do