ciao icon indicating copy to clipboard operation
ciao copied to clipboard

Wrong failure message on undefined

Open fabriziomoscon opened this issue 12 years ago • 2 comments

consider this example

#? check 1
should.exist json.body

#? check2
json.body.user.mobile_number.should.equal '+447868493599'

returns

 ✘ check 1
 Cannot read property 'should' of undefined

it should return check2

fabriziomoscon avatar Jun 27 '13 15:06 fabriziomoscon

Hey, I couldn't reproduce this, I added a testcase which behaves as expected for me. Can you please run it and see if it passes/fails & PR if it doesn't cover the issue.

https://github.com/missinglink/ciao/commit/e162a2b1135fde81da8ddc9754251a74f4157098

peter@edgy:/var/www/ciao$ ciao scripts/examples/issue46.coffee 
 .E

 Time: 0.82 seconds

 GET https://api.github.com:443/repos/joyent/node/readme scripts/examples/issue46.coffee 
 ✘ check2
 Cannot read property 'should' of undefined

 Tests: 2, Errors: 1

missinglink avatar Jul 27 '13 20:07 missinglink

@fabriziomoscon do you have any more info on how to reproduce this?

missinglink avatar Aug 21 '13 21:08 missinglink