Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Dec 10, 2015
1 parent fb35a11 commit 3fdf44d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
5 changes: 1 addition & 4 deletions api.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ var fs = require('fs');
var flatten = require('arr-flatten');
var Promise = require('bluebird');
var figures = require('figures');
var objectAssign = require('object-assign');
var globby = require('globby');
var chalk = require('chalk');
var fork = require('./lib/fork');
Expand All @@ -18,9 +17,7 @@ function Api(files, options) {

EventEmitter.call(this);

objectAssign(this, options);
this.options = options;

this.options = options || {};
this.rejectionCount = 0;
this.exceptionCount = 0;
this.passCount = 0;
Expand Down
4 changes: 2 additions & 2 deletions test/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ test('fail-fast mode', function (t) {

api.run()
.then(function () {
t.ok(api.failFast);
t.ok(api.options.failFast);
t.is(api.passCount, 1);
t.is(api.failCount, 1);
t.true(/false fail false/.test(api.errors[0].error.message));
Expand All @@ -79,7 +79,7 @@ test('serial execution mode', function (t) {

api.run()
.then(function () {
t.ok(api.serial);
t.ok(api.options.serial);
t.is(api.passCount, 2);
});
});
Expand Down

0 comments on commit 3fdf44d

Please sign in to comment.