Add test cases for localfilesystem context

This commit is contained in:
nakanishi
2018-07-20 11:23:37 +09:00
parent 8226f1fa75
commit 39b751acf5
2 changed files with 232 additions and 0 deletions

View File

@@ -203,6 +203,8 @@ LocalFileSystem.prototype.set = function(scope, key, value, callback) {
var storagePath = getStoragePath(this.storageBaseDir ,scope);
fs.outputFile(storagePath + ".json", JSON.stringify(newContext, undefined, 4), "utf8").catch(function(err) {
});
} else if (callback && typeof callback !== 'function') {
throw new Error("Callback must be a function");
} else {
this._set(scope,key,value,callback);
}