Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[refactor tests] Remove unused mocks

  • Loading branch information...
commit ca6198bafd58268bf2547afeb70cdcc2a629e724 1 parent 1c91857
@indexzero indexzero authored
View
12 test/helpers/mocks/child-process.js
@@ -1,12 +0,0 @@
-var util = require('util'),
- EventEmitter2 = require('eventemitter2').EventEmitter2,
- StreamMock = require('./stream').StreamMock;
-
-var ChildProcessMock = exports.ChildProcessMock = function () {
- EventEmitter2.call(this);
-
- this.stdout = new StreamMock();
- this.stderr = new StreamMock();
-};
-util.inherits(ChildProcessMock, EventEmitter2);
-
View
25 test/helpers/mocks/monitor.js
@@ -1,25 +0,0 @@
-var util = require('util'),
- broadway = require('broadway'),
- ChildProcessMock = require('./child-process').ChildProcessMock;
-
-var MonitorMock = exports.MonitorMock = function (options) {
- broadway.App.call(this, options);
-
- this.child = new ChildProcessMock();
- this.running = false;
-};
-util.inherits(MonitorMock, broadway.App);
-
-MonitorMock.prototype.__defineGetter__('data', function () {
- return {
- uid: '_uid',
- command: 'node'
- }
-});
-
-MonitorMock.prototype.kill = MonitorMock.prototype.stop = function (forceStop) {
- this.running = false;
-
- this.emit('stop');
-};
-
View
19 test/helpers/mocks/stream.js
@@ -1,19 +0,0 @@
-var util = require('util'),
- EventEmitter2 = require('eventemitter2').EventEmitter2;
-
-var StreamMock = exports.StreamMock = function () {
- EventEmitter2.call(this);
-
- this.contents = [];
- this.closed = false;
-};
-util.inherits(StreamMock, EventEmitter2);
-
-StreamMock.prototype.write = function (data) {
- this.contents.push(data);
-};
-
-StreamMock.prototype.close = StreamMock.prototype.end = function () {
- this.closed = true;
-};
-
Please sign in to comment.
Something went wrong with that request. Please try again.