summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Early <alexander.early@gmail.com>2015-07-19 23:24:57 -0700
committerAlexander Early <alexander.early@gmail.com>2015-07-19 23:24:57 -0700
commit5a0aa3eeffdb44234d6a1186d62f754ceba26b01 (patch)
treefe7630c9809a3bbf05fa96aa6a68c9f3f89b9f31
parent2dae7878ef485d40bd14eef4b5be70a246633659 (diff)
downloadasync-5a0aa3eeffdb44234d6a1186d62f754ceba26b01.tar.gz
added not about mocha migration, fixed linting
-rw-r--r--.jshintrc5
-rw-r--r--Makefile4
-rw-r--r--mocha_test/forever.js4
-rw-r--r--mocha_test/support/is_browser.js2
-rwxr-xr-xtest/test-async.js5
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) {