We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents ed0a42e + 56aa6bc commit 04e6333Copy full SHA for 04e6333
test/caching.unit.js
@@ -124,6 +124,25 @@ describe("caching", function() {
124
}, 20);
125
});
126
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
138
139
140
+ assert.strictEqual(val, undefined);
141
+ }).then(done)
142
+ .catch(function(err) {
143
+ done(err);
144
+ });
145
146
147
148
0 commit comments