Skip to content

only last failing expectation(-group) is shown in reporting #1705

@robstoll

Description

@robstoll

Affected Version

1.1.0

API

fluent, infix

Platform

jvm, js

Kotlin Version

1.9.10

How to reproduce the problem?

expect(1).withOptions {
    withComponent(Reporter::class) { c ->
        val assertionFormatterFacade = c.build<AssertionFormatterFacade>()
        object : Reporter {
            override fun format(assertion: Assertion, sb: StringBuilder): Unit =
                assertionFormatterFacade.format(assertion, sb, this::assertionFilter)

            private fun assertionFilter(assertion: Assertion) = true
        }
    }
}.toEqual(1).toEqual(2)

Describe the bug

the report shows only the failing expectation

for the standard-case (fail on first expectation(-group) failure, show only failing) the current implementation is fine but as soon as one would like to have a different behaviour (e.g. show all expectations not only failing) the current implementation is buggy

Expected behaviour

the report contains all expectations

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions