Skip to content

Commit 8673c92

Browse files
committed
fixing null value isCachable test
1 parent ffc07f1 commit 8673c92

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test/lib/redis-store-spec.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,12 @@ describe('set', function () {
8686
});
8787

8888
it('should not be able to store a null value (not cacheable)', function (done) {
89-
try {
90-
redisCache.set('foo2', null);
89+
redisCache.set('foo2', null, function (err) {
90+
if (err) {
91+
return done();
92+
}
9193
done(new Error('Null is not a valid value!'));
92-
} catch (e) {
93-
done();
94-
}
94+
});
9595
});
9696

9797
it('should store a value without callback', function (done) {

0 commit comments

Comments
 (0)