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
827 B

var assert = require('assert');
12 years ago
var support = require('../support');
var memoryStore = require('../../lib/stores/memory');
12 years ago
10 years ago
describe("memory store", function() {
describe("instantiating", function() {
it("lets us pass in no args", function(done) {
var memoryCache = memoryStore.create();
support.testSetGetDel(memoryCache, done);
12 years ago
});
});
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);
});
});
12 years ago
});