1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-04 15:02:09 +03:00

Add more tests

Add execution order tests
Fix flaky test
Add utils tests
Improve other tests
This commit is contained in:
Ruben Bridgewater
2016-02-25 02:37:42 +01:00
parent 614e35ab57
commit 4f3c4a2ef6
7 changed files with 210 additions and 12 deletions

View File

@ -66,14 +66,21 @@ describe("The 'set' method", function () {
});
});
describe("with undefined 'key' and missing 'value' parameter", function () {
it("reports an error", function (done) {
describe("reports an error with invalid parameters", function () {
it("undefined 'key' and missing 'value' parameter", function (done) {
client.set(undefined, function (err, res) {
helper.isError()(err, null);
assert.equal(err.command, 'SET');
done();
});
});
it("empty array as second parameter", function (done) {
client.set('foo', [], function (err, res) {
assert.strictEqual(err.message, "ERR wrong number of arguments for 'set' command");
done();
});
});
});
});