atrium icon indicating copy to clipboard operation
atrium copied to clipboard

`because` shows up even if expectation holds

Open robstoll opened this issue 1 year ago • 0 comments

Affected Version

1.2.0

API

fluent, infix

Platform

jvm, js

Kotlin Version

1.9.24 (api verison 1.4)

How to reproduce the problem?

expect(1) {
    because("should not show up") {
        toEqual(1)
    }
    toEqual(2)
}

Describe the bug

results in

I expected subject: 1        (Int <1>)
ℹ because: should not show up
◆ to equal: 2        (Int <2>)

Expected behaviour

should only show:

I expected subject: 1        (Int <1>)
◆ to equal: 2        (Int <2>)

robstoll avatar May 23 '24 21:05 robstoll