Skip to content

Commit

Permalink
Fix linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ScottFreeCode committed Jun 11, 2017
1 parent 89c7107 commit e0b785f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
14 changes: 7 additions & 7 deletions lib/runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -430,8 +430,8 @@ Runner.prototype.runTest = function (fn) {
return;
}
if (this.forbidOnly && this.hasOnly) {
fn(new Error("`.only` forbidden"))
return
fn(new Error('`.only` forbidden'));
return;
}
if (this.asyncOnly) {
test.asyncOnly = true;
Expand Down Expand Up @@ -535,7 +535,7 @@ Runner.prototype.runTests = function (suite, fn) {
if (test.isPending()) {
if (self.forbidPending) {
test.isPending = alwaysFalse;
self.fail(test, new Error("Pending test forbidden"));
self.fail(test, new Error('Pending test forbidden'));
delete test.isPending;
} else {
self.emit('pending', test);
Expand All @@ -550,7 +550,7 @@ Runner.prototype.runTests = function (suite, fn) {
if (test.isPending()) {
if (self.forbidPending) {
test.isPending = alwaysFalse;
self.fail(test, new Error("Pending test forbidden"));
self.fail(test, new Error('Pending test forbidden'));
delete test.isPending;
} else {
self.emit('pending', test);
Expand All @@ -567,7 +567,7 @@ Runner.prototype.runTests = function (suite, fn) {
if (err) {
var retry = test.currentRetry();
if (err instanceof Pending && self.forbidPending) {
self.fail(test, new Error("Pending test forbidden"))
self.fail(test, new Error('Pending test forbidden'));
} else if (err instanceof Pending) {
test.pending = true;
self.emit('pending', test);
Expand Down Expand Up @@ -604,8 +604,8 @@ Runner.prototype.runTests = function (suite, fn) {
next();
};

function alwaysFalse() {
return false
function alwaysFalse () {
return false;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

describe('forbid pending - test calls `skip()`', function () {
it('test1', function () {});
it('test2', function () { this.skip() });
it('test2', function () { this.skip(); });
it('test3', function () {});
});
8 changes: 4 additions & 4 deletions test/integration/options.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ describe('options', function () {
run('options/forbid-only/only.js', args, function (err, res) {
assert(!err);
assert.equal(res.code, 1);
assert.equal(res.failures[0].err.message, '`.only` forbidden')
assert.equal(res.failures[0].err.message, '`.only` forbidden');
done();
});
});
Expand All @@ -223,7 +223,7 @@ describe('options', function () {
run('options/forbid-pending/skip.js', args, function (err, res) {
assert(!err);
assert.equal(res.code, 1);
assert.equal(res.failures[0].err.message, pendingErrorMessage)
assert.equal(res.failures[0].err.message, pendingErrorMessage);
done();
});
});
Expand All @@ -232,7 +232,7 @@ describe('options', function () {
run('options/forbid-pending/pending.js', args, function (err, res) {
assert(!err);
assert.equal(res.code, 1);
assert.equal(res.failures[0].err.message, pendingErrorMessage)
assert.equal(res.failures[0].err.message, pendingErrorMessage);
done();
});
});
Expand All @@ -241,7 +241,7 @@ describe('options', function () {
run('options/forbid-pending/this.skip.js', args, function (err, res) {
assert(!err);
assert.equal(res.code, 1);
assert.equal(res.failures[0].err.message, pendingErrorMessage)
assert.equal(res.failures[0].err.message, pendingErrorMessage);
done();
});
});
Expand Down

0 comments on commit e0b785f

Please sign in to comment.