var assert = require('assert'); var support = require('../support'); var memoryStore = require('../../lib/stores/memory'); describe("memory store", function() { describe("instantiating", function() { it("lets us pass in no args", function(done) { var memoryCache = memoryStore.create(); support.testSetGetDel(memoryCache, done); }); }); describe("set()", function() { var memoryCache; beforeEach(function() { memoryCache = memoryStore.create({noPromises: true}); }); it("does not require a callback", function(done) { memoryCache.set('foo', 'bar'); setTimeout(function() { assert.equal(memoryCache.get('foo'), 'bar'); done(); }, 10); }); }); });