withApplication
fun <R> withApplication(environment: ApplicationEnvironment = createTestEnvironment(), configure: TestApplicationEngine.Configuration.() -> Unit = {}, test: TestApplicationEngine.() -> R): R
Deprecated (with error)
Use new `testApplication` API: https://ktor.io/docs/migration-to-20x.html#testing-api
Starts a test application engine, passes it to the test function, and stops it.