|
|
@ -12,11 +12,18 @@ describe("memory store", function() { |
|
|
|
|
|
|
|
describe("set()", function() { |
|
|
|
var memoryCache; |
|
|
|
var origPromise; |
|
|
|
|
|
|
|
beforeEach(function() { |
|
|
|
origPromise = global.Promise; |
|
|
|
delete global.Promise; |
|
|
|
memoryCache = memoryStore.create({noPromises: true}); |
|
|
|
}); |
|
|
|
|
|
|
|
afterEach(function() { |
|
|
|
global.Promise = origPromise; |
|
|
|
}); |
|
|
|
|
|
|
|
// This test should pass in node v0.10.x:
|
|
|
|
it("does not require a callback or use of Promises", function(done) { |
|
|
|
memoryCache.set('foo', 'bar'); |
|
|
|