diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000000..47ce1a5519 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,15 @@ +# This file is for unifying the coding style for different editors and IDEs +# editorconfig.org + +root = true + +[*] +end_of_line = lf +charset = utf-8 +insert_final_newline = true +trim_trailing_whitespace = true +indent_style = space +indent_size = 2 + +[Makefile] +indent_style = tab diff --git a/index.js b/index.js index 507566fac2..169b271770 100644 --- a/index.js +++ b/index.js @@ -1,4 +1,3 @@ - module.exports = process.env.COV ? require('./lib-cov/mocha') - : require('./lib/mocha'); \ No newline at end of file + : require('./lib/mocha'); diff --git a/lib/browser/debug.js b/lib/browser/debug.js index 03cf59234c..0d939e5c07 100644 --- a/lib/browser/debug.js +++ b/lib/browser/debug.js @@ -1,4 +1,3 @@ - module.exports = function(type){ return function(){ } diff --git a/lib/browser/escape-string-regexp.js b/lib/browser/escape-string-regexp.js index ac6572cabe..21a95663ed 100644 --- a/lib/browser/escape-string-regexp.js +++ b/lib/browser/escape-string-regexp.js @@ -3,9 +3,9 @@ var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g; module.exports = function (str) { - if (typeof str !== 'string') { - throw new TypeError('Expected a string'); - } + if (typeof str !== 'string') { + throw new TypeError('Expected a string'); + } - return str.replace(matchOperatorsRe, '\\$&'); + return str.replace(matchOperatorsRe, '\\$&'); }; diff --git a/lib/browser/events.js b/lib/browser/events.js index cfbd072028..f708260896 100644 --- a/lib/browser/events.js +++ b/lib/browser/events.js @@ -1,4 +1,3 @@ - /** * Module exports. */ @@ -175,4 +174,4 @@ EventEmitter.prototype.emit = function (name) { } return true; -}; \ No newline at end of file +}; diff --git a/lib/browser/progress.js b/lib/browser/progress.js index 90526f72b8..b30e5179ea 100644 --- a/lib/browser/progress.js +++ b/lib/browser/progress.js @@ -94,28 +94,28 @@ Progress.prototype.draw = function(ctx){ , y = half , rad = half - 1 , fontSize = this._fontSize; - + ctx.font = fontSize + 'px ' + this._font; - + var angle = Math.PI * 2 * (percent / 100); ctx.clearRect(0, 0, size, size); - + // outer circle ctx.strokeStyle = '#9f9f9f'; ctx.beginPath(); ctx.arc(x, y, rad, 0, angle, false); ctx.stroke(); - + // inner circle ctx.strokeStyle = '#eee'; ctx.beginPath(); ctx.arc(x, y, rad - 1, 0, angle, true); ctx.stroke(); - + // text var text = this._text || (percent | 0) + '%' , w = ctx.measureText(text).width; - + ctx.fillText( text , x - w / 2 + 1 diff --git a/lib/browser/tty.js b/lib/browser/tty.js index 6f5f079a15..eab6388270 100644 --- a/lib/browser/tty.js +++ b/lib/browser/tty.js @@ -1,4 +1,3 @@ - exports.isatty = function(){ return true; }; diff --git a/lib/context.js b/lib/context.js index 84440bef27..c983b6eb6a 100644 --- a/lib/context.js +++ b/lib/context.js @@ -1,4 +1,3 @@ - /** * Expose `Context`. */ diff --git a/lib/hook.js b/lib/hook.js index 814e7b6242..c2dc346b44 100644 --- a/lib/hook.js +++ b/lib/hook.js @@ -1,4 +1,3 @@ - /** * Module dependencies. */ diff --git a/lib/interfaces/bdd.js b/lib/interfaces/bdd.js index ac16d72fbd..d212da29fa 100644 --- a/lib/interfaces/bdd.js +++ b/lib/interfaces/bdd.js @@ -1,4 +1,3 @@ - /** * Module dependencies. */ diff --git a/lib/interfaces/exports.js b/lib/interfaces/exports.js index cedb905f57..95e8a07012 100644 --- a/lib/interfaces/exports.js +++ b/lib/interfaces/exports.js @@ -1,4 +1,3 @@ - /** * Module dependencies. */ diff --git a/lib/interfaces/index.js b/lib/interfaces/index.js index f7b2655e37..4f825d15b2 100644 --- a/lib/interfaces/index.js +++ b/lib/interfaces/index.js @@ -1,4 +1,3 @@ - exports.bdd = require('./bdd'); exports.tdd = require('./tdd'); exports.qunit = require('./qunit'); diff --git a/lib/interfaces/qunit.js b/lib/interfaces/qunit.js index 0a22641c7a..fee8ac4499 100644 --- a/lib/interfaces/qunit.js +++ b/lib/interfaces/qunit.js @@ -1,4 +1,3 @@ - /** * Module dependencies. */ diff --git a/lib/interfaces/tdd.js b/lib/interfaces/tdd.js index dc43e41a1d..951fc9e1ac 100644 --- a/lib/interfaces/tdd.js +++ b/lib/interfaces/tdd.js @@ -1,4 +1,3 @@ - /** * Module dependencies. */ diff --git a/lib/reporters/base.js b/lib/reporters/base.js index 00c94deffc..6d51fcfdd0 100644 --- a/lib/reporters/base.js +++ b/lib/reporters/base.js @@ -1,4 +1,3 @@ - /** * Module dependencies. */ diff --git a/lib/reporters/doc.js b/lib/reporters/doc.js index eab72e5fe6..d194eb0e69 100644 --- a/lib/reporters/doc.js +++ b/lib/reporters/doc.js @@ -1,4 +1,3 @@ - /** * Module dependencies. */ diff --git a/lib/reporters/dot.js b/lib/reporters/dot.js index e200468343..3c7445760d 100644 --- a/lib/reporters/dot.js +++ b/lib/reporters/dot.js @@ -1,4 +1,3 @@ - /** * Module dependencies. */ diff --git a/lib/reporters/html-cov.js b/lib/reporters/html-cov.js index bfb27ffdf6..74b46adcd9 100644 --- a/lib/reporters/html-cov.js +++ b/lib/reporters/html-cov.js @@ -1,4 +1,3 @@ - /** * Module dependencies. */ @@ -48,4 +47,4 @@ function coverageClass(n) { if (n >= 50) return 'medium'; if (n >= 25) return 'low'; return 'terrible'; -} \ No newline at end of file +} diff --git a/lib/reporters/html.js b/lib/reporters/html.js index 8b44e3ed50..69ce879e26 100644 --- a/lib/reporters/html.js +++ b/lib/reporters/html.js @@ -1,4 +1,3 @@ - /** * Module dependencies. */ diff --git a/lib/reporters/index.js b/lib/reporters/index.js index 1c4fccf060..87b76d904f 100644 --- a/lib/reporters/index.js +++ b/lib/reporters/index.js @@ -1,4 +1,3 @@ - exports.Base = require('./base'); exports.Dot = require('./dot'); exports.Doc = require('./doc'); diff --git a/lib/reporters/json-cov.js b/lib/reporters/json-cov.js index 83e57f4adc..309c0ef54a 100644 --- a/lib/reporters/json-cov.js +++ b/lib/reporters/json-cov.js @@ -1,4 +1,3 @@ - /** * Module dependencies. */ diff --git a/lib/reporters/json-stream.js b/lib/reporters/json-stream.js index 7cb8fbede7..a591cec6bd 100644 --- a/lib/reporters/json-stream.js +++ b/lib/reporters/json-stream.js @@ -1,4 +1,3 @@ - /** * Module dependencies. */ @@ -58,4 +57,4 @@ function clean(test) { , fullTitle: test.fullTitle() , duration: test.duration } -} \ No newline at end of file +} diff --git a/lib/reporters/json.js b/lib/reporters/json.js index 4ec9e12d46..f565506c6e 100644 --- a/lib/reporters/json.js +++ b/lib/reporters/json.js @@ -1,4 +1,3 @@ - /** * Module dependencies. */ diff --git a/lib/reporters/landing.js b/lib/reporters/landing.js index bf064f64b2..3b2622f9d7 100644 --- a/lib/reporters/landing.js +++ b/lib/reporters/landing.js @@ -1,4 +1,3 @@ - /** * Module dependencies. */ @@ -94,4 +93,4 @@ function Landing(runner) { * Inherit from `Base.prototype`. */ -Landing.prototype.__proto__ = Base.prototype; \ No newline at end of file +Landing.prototype.__proto__ = Base.prototype; diff --git a/lib/reporters/list.js b/lib/reporters/list.js index 3328e157a8..f64367a410 100644 --- a/lib/reporters/list.js +++ b/lib/reporters/list.js @@ -1,4 +1,3 @@ - /** * Module dependencies. */ diff --git a/lib/reporters/markdown.js b/lib/reporters/markdown.js index 6383a64248..b4414a7a2c 100644 --- a/lib/reporters/markdown.js +++ b/lib/reporters/markdown.js @@ -88,4 +88,4 @@ function Markdown(runner) { process.stdout.write(generateTOC(runner.suite)); process.stdout.write(buf); }); -} \ No newline at end of file +} diff --git a/lib/reporters/min.js b/lib/reporters/min.js index 1b6117d065..ce1a3fef12 100644 --- a/lib/reporters/min.js +++ b/lib/reporters/min.js @@ -1,4 +1,3 @@ - /** * Module dependencies. */ diff --git a/lib/reporters/spec.js b/lib/reporters/spec.js index ada25c3eae..e74f4ace7c 100644 --- a/lib/reporters/spec.js +++ b/lib/reporters/spec.js @@ -1,4 +1,3 @@ - /** * Module dependencies. */ diff --git a/lib/reporters/tap.js b/lib/reporters/tap.js index 2bcd995baa..01a92eb076 100644 --- a/lib/reporters/tap.js +++ b/lib/reporters/tap.js @@ -1,4 +1,3 @@ - /** * Module dependencies. */ diff --git a/lib/reporters/templates/style.html b/lib/reporters/templates/style.html index 643c0ab7b8..4b1f6826c6 100644 --- a/lib/reporters/templates/style.html +++ b/lib/reporters/templates/style.html @@ -317,4 +317,4 @@ code .string { color: #5890AD } code .keyword { color: #8A6343 } code .number { color: #2F6FAD } - \ No newline at end of file + diff --git a/lib/reporters/xunit.js b/lib/reporters/xunit.js index 3506a07b21..955eede0aa 100644 --- a/lib/reporters/xunit.js +++ b/lib/reporters/xunit.js @@ -1,4 +1,3 @@ - /** * Module dependencies. */ diff --git a/lib/runnable.js b/lib/runnable.js index 940900718d..b0476f2fbe 100644 --- a/lib/runnable.js +++ b/lib/runnable.js @@ -1,4 +1,3 @@ - /** * Module dependencies. */ diff --git a/lib/suite.js b/lib/suite.js index e8696f402c..011817b242 100644 --- a/lib/suite.js +++ b/lib/suite.js @@ -1,4 +1,3 @@ - /** * Module dependencies. */ diff --git a/lib/test.js b/lib/test.js index 11773e0cc9..4a4cf63cce 100644 --- a/lib/test.js +++ b/lib/test.js @@ -1,4 +1,3 @@ - /** * Module dependencies. */ diff --git a/media/logo.svg b/media/logo.svg index 88d3713080..1bed0ce1d1 100644 --- a/media/logo.svg +++ b/media/logo.svg @@ -1,8 +1,7 @@ - + mocha diff --git a/mocha.js b/mocha.js index 5814b15deb..3d540b61f8 100644 --- a/mocha.js +++ b/mocha.js @@ -719,28 +719,28 @@ Progress.prototype.draw = function(ctx){ , y = half , rad = half - 1 , fontSize = this._fontSize; - + ctx.font = fontSize + 'px ' + this._font; - + var angle = Math.PI * 2 * (percent / 100); ctx.clearRect(0, 0, size, size); - + // outer circle ctx.strokeStyle = '#9f9f9f'; ctx.beginPath(); ctx.arc(x, y, rad, 0, angle, false); ctx.stroke(); - + // inner circle ctx.strokeStyle = '#eee'; ctx.beginPath(); ctx.arc(x, y, rad - 1, 0, angle, true); ctx.stroke(); - + // text var text = this._text || (percent | 0) + '%' , w = ctx.measureText(text).width; - + ctx.fillText( text , x - w / 2 + 1 @@ -6071,4 +6071,4 @@ mocha.run = function(fn){ */ Mocha.process = process; -})(); \ No newline at end of file +})(); diff --git a/support/compile.js b/support/compile.js index a0a94d2ff3..bea017ab51 100644 --- a/support/compile.js +++ b/support/compile.js @@ -1,4 +1,3 @@ - /** * Module dependencies. */ diff --git a/support/foot.js b/support/foot.js index 158693a025..0319a0fe5f 100644 --- a/support/foot.js +++ b/support/foot.js @@ -1 +1 @@ -})(); \ No newline at end of file +})(); diff --git a/test/acceptance/context.js b/test/acceptance/context.js index add011bdac..47c2db7083 100644 --- a/test/acceptance/context.js +++ b/test/acceptance/context.js @@ -1,4 +1,3 @@ - describe('Context', function(){ beforeEach(function(){ this.calls = ['before']; diff --git a/test/acceptance/diffs.js b/test/acceptance/diffs.js index b0b6eaee89..3b3155f7fd 100644 --- a/test/acceptance/diffs.js +++ b/test/acceptance/diffs.js @@ -1,4 +1,3 @@ - var fs = require('fs') , cssin = fs.readFileSync('test/acceptance/fixtures/css.in', 'ascii') , cssout = fs.readFileSync('test/acceptance/fixtures/css.out', 'ascii'); diff --git a/test/acceptance/duration.js b/test/acceptance/duration.js index 1f4c5c86f4..4f319b8a3c 100644 --- a/test/acceptance/duration.js +++ b/test/acceptance/duration.js @@ -1,4 +1,3 @@ - describe('durations', function(){ describe('when slow', function(){ it('should highlight in red', function(done){ diff --git a/test/acceptance/fixtures/css.in b/test/acceptance/fixtures/css.in index 29fb2746e7..09a3ca5363 100644 --- a/test/acceptance/fixtures/css.in +++ b/test/acceptance/fixtures/css.in @@ -6,4 +6,4 @@ body { a { color: blue -} \ No newline at end of file +} diff --git a/test/acceptance/fixtures/css.out b/test/acceptance/fixtures/css.out index 643692a4fc..53b3ec906e 100644 --- a/test/acceptance/fixtures/css.out +++ b/test/acceptance/fixtures/css.out @@ -10,4 +10,4 @@ a { foo { bar: 'baz'; -} \ No newline at end of file +} diff --git a/test/acceptance/fs.js b/test/acceptance/fs.js index 102b8e1eac..cdd32166d5 100644 --- a/test/acceptance/fs.js +++ b/test/acceptance/fs.js @@ -1,4 +1,3 @@ - var fs = require('fs'); describe('fs.readFile()', function(){ diff --git a/test/acceptance/glob/glob.js b/test/acceptance/glob/glob.js index b1127a2a11..3029ae82ee 100644 --- a/test/acceptance/glob/glob.js +++ b/test/acceptance/glob/glob.js @@ -1,4 +1,3 @@ - describe('globbing test', function(){ it('should find this test', function(){ // see glob.sh for details diff --git a/test/acceptance/globals.js b/test/acceptance/globals.js index 815eaee5c7..f8ef804b23 100644 --- a/test/acceptance/globals.js +++ b/test/acceptance/globals.js @@ -1,4 +1,3 @@ - describe('global leaks', function(){ before(function(){ // uncomment to test diff --git a/test/acceptance/http.js b/test/acceptance/http.js index 00406e6b0e..1dfa9146a4 100644 --- a/test/acceptance/http.js +++ b/test/acceptance/http.js @@ -1,4 +1,3 @@ - var http = require('http'); var server = http.createServer(function(req, res){ @@ -14,4 +13,4 @@ describe('http', function(){ done(); }) }) -}) \ No newline at end of file +}) diff --git a/test/acceptance/interfaces/bdd.js b/test/acceptance/interfaces/bdd.js index f536aa019a..bea1db2295 100644 --- a/test/acceptance/interfaces/bdd.js +++ b/test/acceptance/interfaces/bdd.js @@ -1,4 +1,3 @@ - describe('Array', function(){ describe('#indexOf()', function(){ it('should return -1 when the value is not present', function(){ diff --git a/test/acceptance/interfaces/exports.js b/test/acceptance/interfaces/exports.js index c93bf28239..38093d50ea 100644 --- a/test/acceptance/interfaces/exports.js +++ b/test/acceptance/interfaces/exports.js @@ -1,4 +1,3 @@ - var calls = []; exports.Array = { diff --git a/test/acceptance/interfaces/qunit.js b/test/acceptance/interfaces/qunit.js index dbdc5bb774..48aa21d602 100644 --- a/test/acceptance/interfaces/qunit.js +++ b/test/acceptance/interfaces/qunit.js @@ -1,4 +1,3 @@ - function ok(expr, msg) { if (!expr) throw new Error(msg); } @@ -21,4 +20,4 @@ suite('String'); test('#length', function(){ ok('foo'.length == 3); -}); \ No newline at end of file +}); diff --git a/test/acceptance/interfaces/tdd.js b/test/acceptance/interfaces/tdd.js index 33311dd6fb..1c6885ed42 100644 --- a/test/acceptance/interfaces/tdd.js +++ b/test/acceptance/interfaces/tdd.js @@ -1,4 +1,3 @@ - suite('Array', function(){ suite('#indexOf()', function(){ var initialValue = 32; diff --git a/test/acceptance/misc/asyncOnly.js b/test/acceptance/misc/asyncOnly.js index e03251f315..7b7086a7ea 100644 --- a/test/acceptance/misc/asyncOnly.js +++ b/test/acceptance/misc/asyncOnly.js @@ -1,4 +1,3 @@ - describe('asyncOnly', function(){ it('should display an error', function(){ diff --git a/test/acceptance/misc/bail.js b/test/acceptance/misc/bail.js index 0628b2fbe2..a2c0c1396f 100644 --- a/test/acceptance/misc/bail.js +++ b/test/acceptance/misc/bail.js @@ -1,4 +1,3 @@ - describe('bail', function(){ it('should only display this error', function(done){ throw new Error('this should be displayed'); diff --git a/test/acceptance/misc/cascade.js b/test/acceptance/misc/cascade.js index 0f884a0031..b2dda4df11 100644 --- a/test/acceptance/misc/cascade.js +++ b/test/acceptance/misc/cascade.js @@ -1,4 +1,3 @@ - describe('one', function(){ before(function(){ console.log('before one'); diff --git a/test/acceptance/misc/grep.js b/test/acceptance/misc/grep.js index 9bfe0c5f66..ec9f78f3cd 100644 --- a/test/acceptance/misc/grep.js +++ b/test/acceptance/misc/grep.js @@ -1,4 +1,3 @@ - describe('grep', function(){ describe('fast', function(){ it('should run fast', function(){ diff --git a/test/acceptance/misc/many.js b/test/acceptance/misc/many.js index c479ae43ee..26538bc66e 100644 --- a/test/acceptance/misc/many.js +++ b/test/acceptance/misc/many.js @@ -24,4 +24,4 @@ describe('a load of tests', function(){ addTest(); } -}) \ No newline at end of file +}) diff --git a/test/acceptance/misc/nontty.js b/test/acceptance/misc/nontty.js index cd96f1fc63..2372a660b9 100644 --- a/test/acceptance/misc/nontty.js +++ b/test/acceptance/misc/nontty.js @@ -1,4 +1,3 @@ - describe('tests for non-tty', function(){ it('should pass', function(){ diff --git a/test/acceptance/misc/only/bdd.js b/test/acceptance/misc/only/bdd.js index 56627ab367..ff14dcdfe3 100644 --- a/test/acceptance/misc/only/bdd.js +++ b/test/acceptance/misc/only/bdd.js @@ -1,4 +1,3 @@ - describe('should only run .only test in this bdd suite', function() { it('should not run this test', function() { var zero = 0; @@ -12,4 +11,4 @@ describe('should only run .only test in this bdd suite', function() { var zero = 0; zero.should.equal(1, 'this test should have been skipped'); }); -}); \ No newline at end of file +}); diff --git a/test/acceptance/misc/only/qunit.js b/test/acceptance/misc/only/qunit.js index e1d9ac1abb..07c240f617 100644 --- a/test/acceptance/misc/only/qunit.js +++ b/test/acceptance/misc/only/qunit.js @@ -1,4 +1,3 @@ - function ok(expr, msg) { if (!expr) throw new Error(msg); } @@ -13,4 +12,4 @@ test.only('should run this test', function() { }); test('should run this test, not (includes the title of the .only test)', function() { ok(0 === 1, 'this test should have been skipped'); -}); \ No newline at end of file +}); diff --git a/test/acceptance/misc/only/tdd.js b/test/acceptance/misc/only/tdd.js index ed7e90637e..cb6429a3d6 100644 --- a/test/acceptance/misc/only/tdd.js +++ b/test/acceptance/misc/only/tdd.js @@ -1,4 +1,3 @@ - suite('should only run .only test in this tdd suite', function() { test('should not run this test', function() { var zero = 0; @@ -12,4 +11,4 @@ suite('should only run .only test in this tdd suite', function() { var zero = 0; zero.should.equal(1, 'this test should have been skipped'); }); -}); \ No newline at end of file +}); diff --git a/test/acceptance/multiple.done.js b/test/acceptance/multiple.done.js index aeb88455e1..65537af97f 100644 --- a/test/acceptance/multiple.done.js +++ b/test/acceptance/multiple.done.js @@ -1,4 +1,3 @@ - describe('multiple calls to done()', function(){ beforeEach(function(done){ done() @@ -13,4 +12,4 @@ describe('multiple calls to done()', function(){ // done(); }); }) -}) \ No newline at end of file +}) diff --git a/test/acceptance/pending.js b/test/acceptance/pending.js index cf738b27ba..4ef963709c 100644 --- a/test/acceptance/pending.js +++ b/test/acceptance/pending.js @@ -1,4 +1,3 @@ - describe('pending', function(){ it('should be allowed') -}) \ No newline at end of file +}) diff --git a/test/acceptance/require/require.js b/test/acceptance/require/require.js index 74dd0eb597..20f3e6d6ef 100644 --- a/test/acceptance/require/require.js +++ b/test/acceptance/require/require.js @@ -1,4 +1,3 @@ - describe('require test', function(){ it('should require args in order', function(){ var req = global.required; diff --git a/test/acceptance/root.js b/test/acceptance/root.js index 49a1e7feb4..17738302da 100644 --- a/test/acceptance/root.js +++ b/test/acceptance/root.js @@ -1,4 +1,3 @@ - var calls = []; before(function(){ @@ -9,4 +8,4 @@ describe('root', function(){ it('should be a valid suite', function(){ calls.should.eql(['before']); }) -}) \ No newline at end of file +}) diff --git a/test/acceptance/sort/alpha.js b/test/acceptance/sort/alpha.js index 365f39cd19..7a5302994f 100644 --- a/test/acceptance/sort/alpha.js +++ b/test/acceptance/sort/alpha.js @@ -4,4 +4,4 @@ describe('alpha', function(){ throw new Error('alpha was not executed first'); } }); -}); \ No newline at end of file +}); diff --git a/test/acceptance/sort/beta.js b/test/acceptance/sort/beta.js index 3de3e0ccad..0951f49038 100644 --- a/test/acceptance/sort/beta.js +++ b/test/acceptance/sort/beta.js @@ -2,4 +2,4 @@ describe('beta', function(){ it('should be executed second', function(){ global.beta = 1; }); -}); \ No newline at end of file +}); diff --git a/test/acceptance/test.coffee b/test/acceptance/test.coffee index b1c470a69e..8260940a1e 100644 --- a/test/acceptance/test.coffee +++ b/test/acceptance/test.coffee @@ -3,4 +3,4 @@ obj = foo: 'bar' describe 'coffeescript', -> it 'should work', -> - obj.should.eql foo: 'bar' \ No newline at end of file + obj.should.eql foo: 'bar' diff --git a/test/acceptance/timeout.js b/test/acceptance/timeout.js index a12f2fb1d4..f61c3ba566 100644 --- a/test/acceptance/timeout.js +++ b/test/acceptance/timeout.js @@ -1,4 +1,3 @@ - describe('timeouts', function(){ beforeEach(function(done){ // uncomment diff --git a/test/acceptance/uncaught.js b/test/acceptance/uncaught.js index 7349595df2..f228266e45 100644 --- a/test/acceptance/uncaught.js +++ b/test/acceptance/uncaught.js @@ -1,4 +1,3 @@ - describe('uncaught', function(){ beforeEach(function(done){ process.nextTick(function(){ @@ -14,4 +13,4 @@ describe('uncaught', function(){ done(); }) }) -}) \ No newline at end of file +}) diff --git a/test/browser/large.js b/test/browser/large.js index 1250abaef4..56757eae27 100644 --- a/test/browser/large.js +++ b/test/browser/large.js @@ -1,4 +1,3 @@ - var n = 30; while (n--) { describe('Array ' + n, function(){ @@ -46,4 +45,4 @@ describe('something', function(){ done(); }, 1); }) -}) \ No newline at end of file +}) diff --git a/test/grep.js b/test/grep.js index b4be3715f1..c2a88217f0 100644 --- a/test/grep.js +++ b/test/grep.js @@ -1,4 +1,3 @@ - var Mocha = require('../'); describe('Mocha', function(){ diff --git a/test/hook.async.js b/test/hook.async.js index fd62932c4b..ae6e642d24 100644 --- a/test/hook.async.js +++ b/test/hook.async.js @@ -1,4 +1,3 @@ - describe('async', function(){ var calls = []; diff --git a/test/hook.err.js b/test/hook.err.js index f28ecdd501..d7e6c2e460 100644 --- a/test/hook.err.js +++ b/test/hook.err.js @@ -195,7 +195,7 @@ describe('hook error handling', function(){ after(function(){ calls.push("1.2 after"); }); - }); + }); afterEach(function() { calls.push('1 after each') @@ -244,7 +244,7 @@ describe('hook error handling', function(){ after(function(){ calls.push("2.2 after"); }); - }); + }); afterEach(function() { calls.push('2 after each') @@ -293,4 +293,4 @@ describe('hook error handling', function(){ }); }) -}) \ No newline at end of file +}) diff --git a/test/hook.sync.js b/test/hook.sync.js index c446c6aac7..1d40f5d0c0 100644 --- a/test/hook.sync.js +++ b/test/hook.sync.js @@ -1,4 +1,3 @@ - describe('serial', function(){ var calls = []; @@ -95,4 +94,4 @@ describe('serial', function(){ , 'parent after']); }) }) -}) \ No newline at end of file +}) diff --git a/test/hook.sync.nested.js b/test/hook.sync.nested.js index 94c00da5f7..b87c22298f 100644 --- a/test/hook.sync.nested.js +++ b/test/hook.sync.nested.js @@ -1,4 +1,3 @@ - describe('serial', function(){ describe('nested', function(){ var calls = []; diff --git a/test/hook.timeout.js b/test/hook.timeout.js index 5b158e27e6..155c1e95a6 100644 --- a/test/hook.timeout.js +++ b/test/hook.timeout.js @@ -1,4 +1,3 @@ - before(function(done){ this.timeout(100); setTimeout(done, 50); @@ -6,4 +5,4 @@ before(function(done){ it('should work', function(done) { done(); -}); \ No newline at end of file +}); diff --git a/test/http.meta.2.js b/test/http.meta.2.js index bcc6b6b3dd..a630f70427 100644 --- a/test/http.meta.2.js +++ b/test/http.meta.2.js @@ -1,4 +1,3 @@ - var http = require('http'); var server = http.createServer(function(req, res){ @@ -79,4 +78,4 @@ describe('http server', function(){ .set('Accept', 'application/json') .should .respond('["tobi","loki","jane"]') -}) \ No newline at end of file +}) diff --git a/test/http.meta.js b/test/http.meta.js index 9ae90d868f..00c3f9c8b6 100644 --- a/test/http.meta.js +++ b/test/http.meta.js @@ -1,4 +1,3 @@ - var http = require('http'); var server = http.createServer(function(req, res){ @@ -49,4 +48,4 @@ describe('http requests', function(){ it('should respond with users', get('/users', '["tobi","loki","jane"]', { Accept: 'application/json' })) }) -}) \ No newline at end of file +}) diff --git a/test/jsapi/index.js b/test/jsapi/index.js index 5b5c169ade..2dcdd6dc68 100644 --- a/test/jsapi/index.js +++ b/test/jsapi/index.js @@ -1,4 +1,3 @@ - var Mocha = require('../../') , path = require('path'); diff --git a/test/reporters/json.js b/test/reporters/json.js index 56173bf3a7..f071e75480 100644 --- a/test/reporters/json.js +++ b/test/reporters/json.js @@ -1,4 +1,3 @@ - var Mocha = require('../../') , Suite = Mocha.Suite , Runner = Mocha.Runner diff --git a/test/runnable.js b/test/runnable.js index 6127b4eaf9..3a22e3d0ba 100644 --- a/test/runnable.js +++ b/test/runnable.js @@ -1,4 +1,3 @@ - var mocha = require('../') , Runnable = mocha.Runnable , EventEmitter = require('events').EventEmitter; diff --git a/test/runner.js b/test/runner.js index f5ee8cc13b..04cc583d16 100644 --- a/test/runner.js +++ b/test/runner.js @@ -1,4 +1,3 @@ - var mocha = require('../') , Suite = mocha.Suite , Runner = mocha.Runner diff --git a/test/suite.js b/test/suite.js index e457d64a2f..011b3fb2b8 100644 --- a/test/suite.js +++ b/test/suite.js @@ -1,4 +1,3 @@ - var mocha = require('../') , Context = mocha.Context , Suite = mocha.Suite diff --git a/test/utils.js b/test/utils.js index f5ea9dc1e7..f8d6dcfb80 100644 --- a/test/utils.js +++ b/test/utils.js @@ -1,4 +1,3 @@ - var mocha = require('..'); var utils = mocha.utils; var clean = utils.clean;