visionmedia/mocha — Issue #80: Weird error thrown
Author: johnnywengluu
Created: 2011-11-25 05:04:06+00:00
State: open

I have this code in a test:

person.isInState("Mood").should.be.true

The test is passing. But when I change the returned value by person.isInState("Mood") to false I get the following errors:

✖ 2 of 2 tests failed:

0) Yobiengine should enter states serially: TypeError: Cannot set property 'failed' of undefined

at Runner.fail (/usr/local/lib/node_modules/mocha/lib/runner.js:90:15)
at next (/usr/local/lib/node_modules/mocha/lib/runner.js:294:12)
at /usr/local/lib/node_modules/mocha/lib/runner.js:319:25
at Array.1 (/usr/local/lib/node_modules/mocha/lib/runner.js:272:7)
at EventEmitter._tickCallback (node.js:192:40)

1) Yobiengine should enter states serially: TypeError: Cannot set property 'failed' of undefined

at Runner.fail (/usr/local/lib/node_modules/mocha/lib/runner.js:90:15)
at next (/usr/local/lib/node_modules/mocha/lib/runner.js:294:12)
at /usr/local/lib/node_modules/mocha/lib/runner.js:319:25
at Array.1 (/usr/local/lib/node_modules/mocha/lib/runner.js:272:7)
at EventEmitter._tickCallback (node.js:192:40)

✖ 2 of 2 tests failed:

0) Yobiengine should enter states serially: TypeError: Cannot set property 'failed' of undefined

at Runner.fail (/usr/local/lib/node_modules/mocha/lib/runner.js:90:15)
at next (/usr/local/lib/node_modules/mocha/lib/runner.js:294:12)
at /usr/local/lib/node_modules/mocha/lib/runner.js:319:25
at Array.1 (/usr/local/lib/node_modules/mocha/lib/runner.js:272:7)
at EventEmitter._tickCallback (node.js:192:40)

1) Yobiengine should enter states serially: TypeError: Cannot set property 'failed' of undefined

at Runner.fail (/usr/local/lib/node_modules/mocha/lib/runner.js:90:15)
at next (/usr/local/lib/node_modules/mocha/lib/runner.js:294:12)
at /usr/local/lib/node_modules/mocha/lib/runner.js:319:25
at Array.1 (/usr/local/lib/node_modules/mocha/lib/runner.js:272:7)
at EventEmitter._tickCallback (node.js:192:40)

It doesn't make much sense.