You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test("geo",t=>{letrect=[10,20,60,80]letcases=[[10,20,10,20],[60,80,60,80],// many many more lines removed for readability here[15,21,15,20],[15,77,15,80],[50,40,60,40]]for(constcofcases){t.log(c)const[x,y,xe,ye]=ct.deepEqual(geo.nearestPointInRectangle(x,y, ...rect),[xe,ye])}})
I used to write related cases in the above way which is very clean. One of these cases in middle was failed.
My expectation is that ava stop execution on the failed case and I can know exactly which case was failed by simply looking at the last console output (via t.log(c)).
But ava --fail-fast didn't stop the execution and all cases are printed out finally, causing me unable to know which case was fail.
The text was updated successfully, but these errors were encountered:
--fail-fast stops AVA from starting new tests. It cannot interrupt any tests that are already running.
What you're encountering is that a failed assertion doesn't stop a test implementation from executing. #2455 will give you a way of recognizing when this is the case.
That said, have a look at t.try(). It will let you home in on just the failed cases:
test("geo",asynct=>{letrect=[10,20,60,80]letcases=[[10,20,10,20],[60,80,60,80],// many many more lines removed for readability here[15,21,15,20],[15,77,15,80],[50,40,60,40]]for(constcofcases){constattempt=awaitt.try(tt=>{tt.log(c)const[x,y,xe,ye]=ctt.deepEqual(geo.nearestPointInRectangle(x,y, ...rect),[xe,ye])})attempt.commit({retainLogs: !attempt.passed})}})
(I'm closing this issue for housekeeping purposes, but let's keep the conversation going.)
I used to write related cases in the above way which is very clean. One of these cases in middle was failed.
My expectation is that
ava
stop execution on the failed case and I can know exactly which case was failed by simply looking at the last console output (viat.log(c)
).But
ava --fail-fast
didn't stop the execution and all cases are printed out finally, causing me unable to know which case was fail.The text was updated successfully, but these errors were encountered: