summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorezubarev <zubarev.eugene@gmail.com>2016-05-08 00:28:23 +0600
committerezubarev <zubarev.eugene@gmail.com>2016-05-08 00:28:23 +0600
commit2d049f086f5ab29a515f63a209000a29442e283d (patch)
tree3d644146448b83ee97315f3f2a8ad3e28b24485d
parent210de70d6d594a4c50bc4fe87b16cd8b8eba6f59 (diff)
downloadasync-2d049f086f5ab29a515f63a209000a29442e283d.tar.gz
Replace assert with expect to ease debug
-rw-r--r--mocha_test/asyncify.js14
1 files changed, 7 insertions, 7 deletions
diff --git a/mocha_test/asyncify.js b/mocha_test/asyncify.js
index b171e86..507cd1a 100644
--- a/mocha_test/asyncify.js
+++ b/mocha_test/asyncify.js
@@ -9,7 +9,7 @@ describe('asyncify', function(done){
var parse = async.asyncify(JSON.parse);
parse("{\"a\":1}", function (err, result) {
assert(!err);
- assert(result.a === 1);
+ expect(result.a).to.equal(1);
done();
});
});
@@ -20,7 +20,7 @@ describe('asyncify', function(done){
});
parse("{\"a\":1}", function (err, result) {
assert(!err);
- assert(result === null);
+ expect(result).to.equal(null);
done();
});
});
@@ -42,7 +42,7 @@ describe('asyncify', function(done){
throw new Error("foo");
})(function (err) {
assert(err);
- assert(err.message === "foo");
+ expect(err.message).to.equal("foo");
done();
});
});
@@ -55,8 +55,8 @@ describe('asyncify', function(done){
}
throw new Error("callback error");
});
- } catch (e) {
- assert(e.message === "callback error");
+ } catch (err) {
+ expect(err.message).to.equal("callback error");
done();
}
});
@@ -94,7 +94,7 @@ describe('asyncify', function(done){
if (err) {
return done(new Error("should not get an error here"));
}
- assert(value === "argument resolved");
+ expect(value).to.equal("argument resolved");
done();
});
});
@@ -107,7 +107,7 @@ describe('asyncify', function(done){
};
async.asyncify(promisified)("argument", function (err) {
assert(err);
- assert(err.message === "argument rejected");
+ expect(err.message).to.equal("argument rejected");
done();
});
});