From 5a0aa3eeffdb44234d6a1186d62f754ceba26b01 Mon Sep 17 00:00:00 2001 From: Alexander Early Date: Sun, 19 Jul 2015 23:24:57 -0700 Subject: added not about mocha migration, fixed linting --- .jshintrc | 5 ++++- Makefile | 4 ++-- mocha_test/forever.js | 4 ++-- mocha_test/support/is_browser.js | 2 +- test/test-async.js | 5 +++++ 5 files changed, 14 insertions(+), 6 deletions(-) diff --git a/.jshintrc b/.jshintrc index c66d74c..76be34a 100644 --- a/.jshintrc +++ b/.jshintrc @@ -21,6 +21,9 @@ "node": true, "globals": { "self": true, - "define": true + "define": true, + "describe": true, + "context": true, + "it": true } } diff --git a/Makefile b/Makefile index 6609aa6..bd3c367 100644 --- a/Makefile +++ b/Makefile @@ -23,8 +23,8 @@ clean: rm -rf $(BUILDDIR) lint: - $(JSHINT) $(SRC) test/*.js perf/*.js - $(JSCS) $(SRC) test/*.js perf/*.js + $(JSHINT) $(SRC) test/*.js mocha_test/* perf/*.js + $(JSCS) $(SRC) test/*.js mocha_test/* perf/*.js .PHONY: test lint build all clean diff --git a/mocha_test/forever.js b/mocha_test/forever.js index 3f03b57..970c422 100644 --- a/mocha_test/forever.js +++ b/mocha_test/forever.js @@ -6,7 +6,7 @@ describe('forever', function(){ context('function is asynchronous', function(){ it('executes the function over and over until it yields an error', function(done){ var counter = 0; - addOne = function (callback) { + function addOne(callback) { counter++; if (counter === 50) { return callback('too big!'); @@ -20,7 +20,7 @@ describe('forever', function(){ expect(counter).to.eql(50); done(); }); - }) + }); }); context('function is synchronous', function(){ diff --git a/mocha_test/support/is_browser.js b/mocha_test/support/is_browser.js index 7c765e2..85e1522 100644 --- a/mocha_test/support/is_browser.js +++ b/mocha_test/support/is_browser.js @@ -1,4 +1,4 @@ module.exports = function() { return (typeof process === "undefined") || (process + "" !== "[object process]"); // browserify -} +}; diff --git a/test/test-async.js b/test/test-async.js index 10290ac..e9e5663 100755 --- a/test/test-async.js +++ b/test/test-async.js @@ -1,3 +1,8 @@ +/** + * NOTE: We are in the process of migrating these tests to Mocha. If you are + * adding a new test, consider creating a new spec file in mocha_tests/ + */ + var async = require('../lib/async'); if (!Function.prototype.bind) { -- cgit v1.2.1