Closed snogge closed 4 years ago
I'm not sure if this is the same bug, but using assume
in a before-each
form skips the remainder of the before-each
but then seems to run the body of the test as normal (which then fails because the assumption was false).
In addition, using assume
in the body of a test gets overwritten with a passed state if there is an after-each
form. I'm pretty sure this example is an instance of this bug.
Also, I don't believe the assume
macro is documented anywhere. I'm not even certain whether it's meant to be used in a before-each
form, but it seems like it should work there.
As discussed in #149, any
before-each
,buttercup-spec-function
orafter-each
should only set the state of the spec if the new state is "more serious" than the specs current state.This means that
pending
should win oversuccess
andfailure
should win over bothpending
andsuccess
.success
should never win over any other state.All in all we think this will improve the test results.