Fix up promises in tests, remove package-lock

This commit is contained in:
Nick O'Leary 2018-08-20 16:45:50 +01:00
parent 38a1291c5b
commit 954226da0d
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9
3 changed files with 3 additions and 12030 deletions

12027
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -166,10 +166,10 @@ module.exports = function(RED) {
try {
fromRE = new RegExp(fromRE, "g");
} catch (e) {
return Promise.reject(new Error(RED._("change.errors.invalid-from",{error:e.message})));
throw new Error(RED._("change.errors.invalid-from",{error:e.message}));
}
} else {
return Promise.reject(new Error(RED._("change.errors.invalid-from",{error:"unsupported type: "+(typeof fromValue)})));
throw new Error(RED._("change.errors.invalid-from",{error:"unsupported type: "+(typeof fromValue)}));
}
return {
fromType,

View File

@ -673,7 +673,7 @@ describe('localfilesystem',function() {
it('should enumerate context keys in the cache',function() {
var globalData = {foo:"bar"};
fs.outputFile(path.join(resourcesDir,defaultContextBase,"global","global.json"), JSON.stringify(globalData,null,4), "utf8").then(function(){
return fs.outputFile(path.join(resourcesDir,defaultContextBase,"global","global.json"), JSON.stringify(globalData,null,4), "utf8").then(function(){
context = LocalFileSystem({dir: resourcesDir, cache: true, flushInterval: 2});
return context.open()
}).then(function(){