Skip to content

Commit

Permalink
style(*): indentation, etc.
Browse files Browse the repository at this point in the history
  • Loading branch information
a8m committed Mar 7, 2015
1 parent 1830e01 commit 9123d7a
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 34 deletions.
8 changes: 4 additions & 4 deletions lib/mocha.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ function Mocha(options) {
this.bail(options.bail);
this.reporter(options.reporter, options.reporterOptions);
if (null != options.timeout) this.timeout(options.timeout);
this.useColors(options.useColors)
this.useColors(options.useColors);
if (options.enableTimeouts !== null) this.enableTimeouts(options.enableTimeouts);
if (options.slow) this.slow(options.slow);

Expand Down Expand Up @@ -141,8 +141,8 @@ Mocha.prototype.reporter = function(reporter, reporterOptions){
} else {
reporter = reporter || 'spec';
var _reporter;
try { _reporter = require('./reporters/' + reporter); } catch (err) {};
if (!_reporter) try { _reporter = require(reporter); } catch (err) {};
try { _reporter = require('./reporters/' + reporter); } catch (err) {}
if (!_reporter) try { _reporter = require(reporter); } catch (err) {}
if (!_reporter && reporter === 'teamcity')
console.warn('The Teamcity reporter was moved to a package named ' +
'mocha-teamcity-reporter ' +
Expand All @@ -164,7 +164,7 @@ Mocha.prototype.reporter = function(reporter, reporterOptions){
Mocha.prototype.ui = function(name){
name = name || 'bdd';
this._ui = exports.interfaces[name];
if (!this._ui) try { this._ui = require(name); } catch (err) {};
if (!this._ui) try { this._ui = require(name); } catch (err) {}
if (!this._ui) throw new Error('invalid interface "' + name + '"');
this._ui = this._ui(this.suite);
return this;
Expand Down
26 changes: 13 additions & 13 deletions lib/runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -695,20 +695,20 @@ function filterLeaks(ok, globals) {
* @api private
*/

function extraGlobals() {
if (typeof(process) === 'object' &&
typeof(process.version) === 'string') {
function extraGlobals() {
if (typeof(process) === 'object' &&
typeof(process.version) === 'string') {

var nodeVersion = process.version.split('.').reduce(function(a, v) {
return a << 8 | v;
});

// 'errno' was renamed to process._errno in v0.9.11.
var nodeVersion = process.version.split('.').reduce(function(a, v) {
return a << 8 | v;
});

if (nodeVersion < 0x00090B) {
return ['errno'];
}
}
// 'errno' was renamed to process._errno in v0.9.11.

return [];
if (nodeVersion < 0x00090B) {
return ['errno'];
}
}

return [];
}
34 changes: 17 additions & 17 deletions mocha.js
Original file line number Diff line number Diff line change
Expand Up @@ -1486,7 +1486,7 @@ function Mocha(options) {
this.bail(options.bail);
this.reporter(options.reporter, options.reporterOptions);
if (null != options.timeout) this.timeout(options.timeout);
this.useColors(options.useColors)
this.useColors(options.useColors);
if (options.enableTimeouts !== null) this.enableTimeouts(options.enableTimeouts);
if (options.slow) this.slow(options.slow);

Expand Down Expand Up @@ -1545,8 +1545,8 @@ Mocha.prototype.reporter = function(reporter, reporterOptions){
} else {
reporter = reporter || 'spec';
var _reporter;
try { _reporter = require('./reporters/' + reporter); } catch (err) {};
if (!_reporter) try { _reporter = require(reporter); } catch (err) {};
try { _reporter = require('./reporters/' + reporter); } catch (err) {}
if (!_reporter) try { _reporter = require(reporter); } catch (err) {}
if (!_reporter && reporter === 'teamcity')
console.warn('The Teamcity reporter was moved to a package named ' +
'mocha-teamcity-reporter ' +
Expand All @@ -1568,7 +1568,7 @@ Mocha.prototype.reporter = function(reporter, reporterOptions){
Mocha.prototype.ui = function(name){
name = name || 'bdd';
this._ui = exports.interfaces[name];
if (!this._ui) try { this._ui = require(name); } catch (err) {};
if (!this._ui) try { this._ui = require(name); } catch (err) {}
if (!this._ui) throw new Error('invalid interface "' + name + '"');
this._ui = this._ui(this.suite);
return this;
Expand Down Expand Up @@ -5249,24 +5249,24 @@ function filterLeaks(ok, globals) {
* @api private
*/

function extraGlobals() {
if (typeof(process) === 'object' &&
typeof(process.version) === 'string') {
function extraGlobals() {
if (typeof(process) === 'object' &&
typeof(process.version) === 'string') {

var nodeVersion = process.version.split('.').reduce(function(a, v) {
return a << 8 | v;
});

// 'errno' was renamed to process._errno in v0.9.11.
var nodeVersion = process.version.split('.').reduce(function(a, v) {
return a << 8 | v;
});

if (nodeVersion < 0x00090B) {
return ['errno'];
}
}
// 'errno' was renamed to process._errno in v0.9.11.

return [];
if (nodeVersion < 0x00090B) {
return ['errno'];
}
}

return [];
}

}); // module: runner.js

require.register("suite.js", function(module, exports, require){
Expand Down

0 comments on commit 9123d7a

Please sign in to comment.