filer/tests/lib/memory.js

23 lines
385 B
JavaScript
Raw Normal View History

2014-05-23 18:54:59 +00:00
var Filer = require('../..');
2014-05-23 18:54:59 +00:00
function MemoryTestProvider(name) {
var that = this;
2014-05-23 18:54:59 +00:00
function cleanup(callback) {
that.provider = null;
callback();
}
2014-05-23 18:54:59 +00:00
function init() {
if(that.provider) {
return;
}
2014-05-23 18:54:59 +00:00
that.provider = new Filer.FileSystem.providers.Memory(name);
}
2014-05-23 18:54:59 +00:00
this.init = init;
this.cleanup = cleanup;
}
2014-05-23 18:54:59 +00:00
module.exports = MemoryTestProvider;