Open
Description
While attempting to add a means of signalling an exception generated outside the context of a test to Whiskey, I happened upon another bug with respect to exceptions within the context of a test.
To reproduce:
- Edit lib/common.js and insert this text on line 425:
throw { message: 'hello world' };
- Invoke Whiskey (see results below for how I invoked it).
Apparently, the _testObj member of the TestFile class is not being initialized.
$ NODE_PATH=$(pwd)/lib-cov bin/whiskey --coverage --coverage-reporter cli --coverage-file /tmp/hooey --coverage-dir /tmp -t example/test-bdd.js /Users/sfalvo/git/whiskey :: Mon Jun 10 15:32:34 PDT 2013
path.existsSync is now called `fs.existsSync`.
/Users/sfalvo/git/whiskey/example/test-bdd.js
Stderr:
/Users/sfalvo/git/whiskey/lib/common.js:553
test._testObj.finish();
^
TypeError: Cannot call method 'finish' of null
at TestFile.addUncaughtException (/Users/sfalvo/git/whiskey/lib/common.js:553:19)
at process.<anonymous> (/Users/sfalvo/git/whiskey/lib/run_test_file.js:116:12)
at process.EventEmitter.emit (events.js:95:17)
at process._fatalException (node.js:272:26)
Metadata
Metadata
Assignees
Labels
No labels