Browse Source

test: fix common.mustCall

Don't run the 'has function been called?' checks if the test is exiting
with an error because a failed check will mask the real exception.

v0.8 doesn't have the _fatalException machinery in src/node.js and
src/node.cc so it doesn't have this issue.
v0.9.10-release
Ben Noordhuis 12 years ago
parent
commit
d5a5ae3c11
  1. 4
      test/common.js

4
test/common.js

@ -163,7 +163,9 @@ process.on('exit', function() {
var mustCallChecks = []; var mustCallChecks = [];
function runCallChecks() { function runCallChecks(exitCode) {
if (exitCode !== 0) return;
var failed = mustCallChecks.filter(function(context) { var failed = mustCallChecks.filter(function(context) {
return context.actual !== context.expected; return context.actual !== context.expected;
}); });

Loading…
Cancel
Save