Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
charlierudolph committed Jan 31, 2017
1 parent ac79018 commit 4945fb0
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 28 deletions.
8 changes: 4 additions & 4 deletions lib/mocha.js
Original file line number Diff line number Diff line change
Expand Up @@ -487,10 +487,10 @@ Mocha.prototype.delay = function delay () {
* Pending tests and test marked only or skip fail the suite
* @returns {Mocha}
*/
Mocha.prototype.productionMode = function() {
this.options.productionMode = true;
return this;
};
Mocha.prototype.productionMode = function () {
this.options.productionMode = true;
return this;
};

/**
* Run tests and invoke `fn()` when complete.
Expand Down
4 changes: 2 additions & 2 deletions lib/runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -824,9 +824,9 @@ Runner.prototype.run = function (fn) {
var failures = self.failures;
if (self.productionMode) {
if (self.hasOnly) {
failures += self.stats.tests
failures += self.stats.tests;
} else {
failures += self.stats.pending
failures += self.stats.pending;
}
}
debug('end');
Expand Down
8 changes: 4 additions & 4 deletions test/integration/fixtures/options/production/only.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
describe('production mode - only', function() {
it('test1', function() {});
it.only('stest2', function() {});
it('test3', function() {});
describe('production mode - only', function () {
it('test1', function () {});
it.only('stest2', function () {});
it('test3', function () {});
});
6 changes: 3 additions & 3 deletions test/integration/fixtures/options/production/pending.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
describe('production mode - pending', function() {
it('test1', function() {});
describe('production mode - pending', function () {
it('test1', function () {});
it('test2');
it('test3', function() {});
it('test3', function () {});
});
8 changes: 4 additions & 4 deletions test/integration/fixtures/options/production/skipped.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
describe('production mode - skipped', function() {
it('test1', function() {});
it.skip('test2', function() {});
it('test3', function() {});
describe('production mode - skipped', function () {
it('test1', function () {});
it.skip('test2', function () {});
it('test3', function () {});
});
22 changes: 11 additions & 11 deletions test/integration/options.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,31 +181,31 @@ describe('options', function () {
});
});

describe('--production', function() {
before(function() {
describe('--production', function () {
before(function () {
args = ['--production'];
});

it('fails skipped tests', function(done) {
run('options/production/skipped.js', args, function(err, res) {
it('fails skipped tests', function (done) {
run('options/production/skipped.js', args, function (err, res) {
assert(!err);
assert.equal(res.code, 1)
assert.equal(res.code, 1);
done();
});
});

it('fails pending tests', function(done) {
run('options/production/pending.js', args, function(err, res) {
it('fails pending tests', function (done) {
run('options/production/pending.js', args, function (err, res) {
assert(!err);
assert.equal(res.code, 1)
assert.equal(res.code, 1);
done();
});
});

it('fails tests marked only', function(done) {
run('options/production/only.js', args, function(err, res) {
it('fails tests marked only', function (done) {
run('options/production/only.js', args, function (err, res) {
assert(!err);
assert.equal(res.code, 1)
assert.equal(res.code, 1);
done();
});
});
Expand Down

0 comments on commit 4945fb0

Please sign in to comment.