Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
robstoll opened this issue Feb 11, 2024 · 0 comments · Fixed by #1704
Closed

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

robstoll opened this issue Feb 11, 2024 · 0 comments · Fixed by #1704
Assignees
Labels
Milestone

Comments

@robstoll
Copy link
Owner

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

@robstoll robstoll added the bug label Feb 11, 2024
@robstoll robstoll added this to the 1.2.0 milestone Feb 11, 2024
@robstoll robstoll self-assigned this Feb 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant