You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

30 lines
896 B

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});
});
// 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');
setTimeout(function() {
assert.equal(memoryCache.get('foo'), 'bar');
done();
}, 10);
});
});
});