Hi, there
How can I rewrite the unit test code such as :
`
@Test
fun testMyApplication(context: TestContext) {
val async = context.async()
vertx.createHttpClient().getNow(port!!, "localhost", "/") { response ->
response.handler { body ->
context.assertTrue(body.toString().contains("Welcome!"))
async.complete()
}
}
}
`
There is no context object in spek.
How can I rewrite this test?
Hi, unfortunately spek doesn't support vert.x unit tests. We will consider this use case when implementing extensions, see #115.
We're using Spek for testing vertx. We're using a tool called awaitility:
http://www.awaitility.org/
@iamsteveholmes Can one manage testing a Verticle without a TextContext? Do you have any examples out? Thanks!
Most helpful comment
We're using Spek for testing vertx. We're using a tool called awaitility:
http://www.awaitility.org/