-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Closed
Labels
type: error messagetype: unexpected behaviorUser expected result, but got anotherUser expected result, but got another
Description
Current behavior
I use following code to customize the assersion message
dossierPage.filerPanel.getCapsuleItems(filerName1).should(($lis) => { expect($lis, 'Filter "'+filerName1+'"should have 4 items').to.have.length(5) })
The customized message can be shown when using 'cypress open'

But
Desired behavior
- customized message should also be shown when using 'cypress run'
- the line number throw the error should be the right line number
Here is an example of protractor as an reference

Test code to reproduce
- any test scripts, add customized message to 'expect',
- fail the assersion
- run with 'cypress open'
- run with 'cypress run'
- check the failure information
Versions
"cypress": "^5.5.0",
Metadata
Metadata
Assignees
Labels
type: error messagetype: unexpected behaviorUser expected result, but got anotherUser expected result, but got another
