Skip to content

Commit 04e6333

Browse files
committed
Merge branch 'develop'
2 parents ed0a42e + 56aa6bc commit 04e6333

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

test/caching.unit.js

+19
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,25 @@ describe("caching", function() {
124124
}, 20);
125125
});
126126
});
127+
128+
it("lets us delete data using promises", function(done) {
129+
key = support.random.string();
130+
cache.set(key, value)
131+
.then(function() {
132+
return cache.get(key);
133+
}).then(function(val) {
134+
assert.equal(val, value);
135+
}).then(function() {
136+
return cache.del(key);
137+
}).then(function() {
138+
return cache.get(key);
139+
}).then(function(val) {
140+
assert.strictEqual(val, undefined);
141+
}).then(done)
142+
.catch(function(err) {
143+
done(err);
144+
});
145+
});
127146
});
128147
});
129148
});

0 commit comments

Comments
 (0)