Skip to content

Commit

Permalink
fixup merge for pr #1809
Browse files Browse the repository at this point in the history
  • Loading branch information
boneskull committed Jul 2, 2016
1 parent 442b6a0 commit dc6ca3f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
6 changes: 4 additions & 2 deletions lib/runnable.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ var Pending = require('./pending');
var debug = require('debug')('mocha:runnable');
var milliseconds = require('./ms');
var utils = require('./utils');
var inherits = utils.inherits;
var create = require('lodash.create');

/**
* Save timer references to avoid Sinon interfering (see GH-237).
Expand Down Expand Up @@ -62,7 +62,9 @@ function Runnable(title, fn) {
/**
* Inherit from `EventEmitter.prototype`.
*/
inherits(Runnable, EventEmitter);
Runnable.prototype = create(EventEmitter.prototype, {
constructor: Runnable
});

/**
* Set & get timeout `ms`.
Expand Down
4 changes: 3 additions & 1 deletion lib/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ function Test(title, fn) {
/**
* Inherit from `Runnable.prototype`.
*/
inherits(Test, Runnable);
Test.prototype = create(Runnable.prototype, {
constructor: Test
});

Test.prototype.clone = function() {
var test = new Test(this.title, this.fn);
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,7 @@
"glob": "7.0.5",
"growl": "1.9.2",
"json3": "3.3.2",
"lodash.create": "4.0.4",
"mkdirp": "0.5.1",
"pug": "2.0.0-beta3",
"supports-color": "3.1.2",
Expand Down

0 comments on commit dc6ca3f

Please sign in to comment.