diff options
author | Alexander Early <alexander.early@gmail.com> | 2015-07-19 23:24:57 -0700 |
---|---|---|
committer | Alexander Early <alexander.early@gmail.com> | 2015-07-19 23:24:57 -0700 |
commit | 5a0aa3eeffdb44234d6a1186d62f754ceba26b01 (patch) | |
tree | fe7630c9809a3bbf05fa96aa6a68c9f3f89b9f31 | |
parent | 2dae7878ef485d40bd14eef4b5be70a246633659 (diff) | |
download | async-5a0aa3eeffdb44234d6a1186d62f754ceba26b01.tar.gz |
added not about mocha migration, fixed linting
-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) { |