Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

don't call nodeunit.complete in the browser

  • Loading branch information...
commit bee473177be3d1f64a4c5af209ad4431909ee372 1 parent 081cbb7
@caolan authored
Showing with 6 additions and 4 deletions.
  1. +4 −2 lib/core.js
  2. +2 −2 lib/nodeunit.js
View
6 lib/core.js
@@ -14,7 +14,7 @@
*/
var async = require('../deps/async'), //@REMOVE_LINE_FOR_BROWSER
- nodeunit = require('./nodeunit'), //@REMOVE_LINE_FOR_BROWSER
+ nodeunit = require('./nodeunit'), //@REMOVE_LINE_FOR_BROWSER
types = require('./types'); //@REMOVE_LINE_FOR_BROWSER
@@ -157,7 +157,9 @@ exports.runModule = function (name, mod, opt, callback) {
var end = new Date().getTime();
var assertion_list = types.assertionList(a_list, end - start);
options.moduleDone(name, assertion_list);
- nodeunit.complete(name, assertion_list);
+ if (nodeunit.complete) {
+ nodeunit.complete(name, assertion_list);
+ }
callback(null, a_list);
});
};
View
4 lib/nodeunit.js
@@ -92,13 +92,13 @@ for (label in events.EventEmitter.prototype) {
/* Emit event 'complete' on completion of a test suite. */
exports.complete = function(name, assertions)
{
- exports.emit('complete', name, assertions);
+ exports.emit('complete', name, assertions);
};
/* Emit event 'complete' on completion of all tests. */
exports.done = function()
{
- exports.emit('done');
+ exports.emit('done');
};
module.exports = exports;
Please sign in to comment.
Something went wrong with that request. Please try again.