expectDeath
suspend fun expectDeath(kind: AppDeath.Kind? = null, timeout: Duration = timeouts.wait, block: suspend () -> Unit): AppDeath(source)
Runs block, which should make a watched app crash or stop responding (kind when given), and returns that death: the one a failing command in the block carried, or the first logged during the block or within timeout after it. Fails with AssertionError when none came. A command failing because of the death does not fail the block; any other failure does. Only the returned death is handled: another one during the block still fails the test.