diff options
-rw-r--r-- | .jshintrc | 5 | ||||
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | mocha_test/forever.js | 4 | ||||
-rw-r--r-- | mocha_test/support/is_browser.js | 2 | ||||
-rwxr-xr-x | test/test-async.js | 5 |
5 files changed, 14 insertions, 6 deletions
@@ -21,6 +21,9 @@ "node": true, "globals": { "self": true, - "define": true + "define": true, + "describe": true, + "context": true, + "it": true } } @@ -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) { |