Skip to content

armgit / mocha

Public Imported from GitHub
0

☕️ Classic, reliable, trusted test framework for Node.js and the browser

refac(lib/*): add/remove semicolons, etc..

Ariel Mashrakib601370988f7
diff --git a/lib/interfaces/bdd.js b/lib/interfaces/bdd.js
index ef53639d..ac16d72f 100644
--- a/lib/interfaces/bdd.js
+++ b/lib/interfaces/bdd.js
@@ -109,7 +109,7 @@ module.exports = function(suite){
context.it = context.specify = function(title, fn){
var suite = suites[0];
- if (suite.pending) var fn = null;
+ if (suite.pending) fn = null;
var test = new Test(title, fn);
test.file = file;
suite.addTest(test);
diff --git a/lib/interfaces/exports.js b/lib/interfaces/exports.js
index d933274f..cedb905f 100644
--- a/lib/interfaces/exports.js
+++ b/lib/interfaces/exports.js
@@ -52,7 +52,7 @@ module.exports = function(suite){
suites[0].addTest(test);
}
} else {
- var suite = Suite.create(suites[0], key);
+ suite = Suite.create(suites[0], key);
suites.unshift(suite);
visit(obj[key]);
suites.shift();
diff --git a/lib/interfaces/tdd.js b/lib/interfaces/tdd.js
index f2593f94..dc43e41a 100644
--- a/lib/interfaces/tdd.js
+++ b/lib/interfaces/tdd.js
@@ -6,7 +6,7 @@
var Suite = require('../suite')
, Test = require('../test')
, escapeRe = require('escape-string-regexp')
- , utils = require('../utils');;
+ , utils = require('../utils');
/**
* TDD-style interface:
diff --git a/lib/reporters/json-cov.js b/lib/reporters/json-cov.js
index 73d00093..83e57f4a 100644
--- a/lib/reporters/json-cov.js
+++ b/lib/reporters/json-cov.js
@@ -89,7 +89,7 @@ function map(cov) {
}
return ret;
-};
+}
/**
* Map jscoverage data for a single source file
diff --git a/lib/reporters/nyan.js b/lib/reporters/nyan.js
index 4501f6b2..a8d43bf5 100644
--- a/lib/reporters/nyan.js
+++ b/lib/reporters/nyan.js
@@ -185,7 +185,7 @@ NyanCat.prototype.face = function() {
} else {
return '( - .-)';
}
-}
+};
/**
* Move cursor up `n`.
diff --git a/lib/runner.js b/lib/runner.js
index e02bd352..b5a6d492 100644
--- a/lib/runner.js
+++ b/lib/runner.js
@@ -611,7 +611,7 @@ Runner.prototype.run = function(fn){
Runner.prototype.abort = function(){
debug('aborting');
this._abort = true;
-}
+};
/**
* Filter leaks with the given globals flagged as `ok`.
diff --git a/lib/suite.js b/lib/suite.js
index 9073e02c..e8696f40 100644
--- a/lib/suite.js
+++ b/lib/suite.js
@@ -119,7 +119,7 @@ Suite.prototype.enableTimeouts = function(enabled){
debug('enableTimeouts %s', enabled);
this._enableTimeouts = enabled;
return this;
-}
+};
/**
* Set slow `ms` or short-hand such as "2s".
diff --git a/lib/utils.js b/lib/utils.js
index 28af618f..ecc0a142 100644
--- a/lib/utils.js
+++ b/lib/utils.js
@@ -304,7 +304,7 @@ exports.highlightTags = function(name) {
exports.stringify = function(obj) {
if (obj instanceof RegExp) return obj.toString();
return JSON.stringify(exports.canonicalize(obj), null, 2).replace(/,(\n|$)/g, '$1');
-}
+};
/**
* Return a new object that has the keys in sorted order.
@@ -339,7 +339,7 @@ exports.canonicalize = function(obj, stack) {
}
return canonicalizedObj;
- }
+ };
/**
* Lookup file names at the given `path`.
@@ -385,4 +385,4 @@ exports.lookupFiles = function lookupFiles(path, extensions, recursive) {
});
return files;
-}
+};