How do you access the `ApplicationConfig` inside o...
# ktor
l
How do you access the
ApplicationConfig
inside of
testApplication
?
Copy code
config.property("foo").getString()
doesn't work due to
Unresolved reference: config
and
Copy code
environment.config.property("foo").getString()
doesn't work due to:
Cannot access 'environment': it is internal in 'ApplicationTestBuilder'
What am I missing here? 😃
a
You can access the config only inside the
application
's block:
Copy code
@Test
fun test() = testApplication {
    application {
        environment.config.property("foo").getString()
    }
}