withApplication

fun <R> withApplication(    environment: ApplicationEnvironment = createTestEnvironment(),     configure: TestApplicationEngine.Configuration.() -> Unit = {},     test: TestApplicationEngine.() -> R): R

Deprecated

Please use new `testApplication` API: https://ktor.io/docs/migrating-2.html#testing-api

Starts a test application engine, passes it to the test function, and stops it.