Join Slack
Am I missing a trick to test Ktor (clients)? I'm using `MockEngine` (from ktor) in a `FunSpec`, and ...
# kotest
p
Paul Griffith
02/16/2021, 11:56 PM
Am I missing a trick to test Ktor (clients)? I'm using
MockEngine
(from ktor) in a
FunSpec
, and the code is definitely being run (I see the failure message being logged) but the actual test passes
Paul Griffith
02/16/2021, 11:57 PM
Untitled
Paul Griffith
02/16/2021, 11:57 PM
stdout from the test
Untitled
s
sam
02/17/2021, 12:06 AM
For a test to fail an exception must be thrown
sam
02/17/2021, 12:06 AM
I guess the client is swallowing it
sam
02/17/2021, 12:07 AM
do you have to do something like client.get("url") or whatever
🙏 1
p
Paul Griffith
02/17/2021, 12:16 AM
Oh, yeah, duh. I'm deliberately accepting exceptions in the client code. Nevermind!
👍🏻 1
8
Views
Open in Slack
Previous
Next
kotlinlang
A modern programming language that makes developers happier.
Powered by