Fully remove when.js dependency

This commit is contained in:
Nick O'Leary
2020-11-30 14:38:48 +00:00
parent beccdac717
commit 5992ed1fab
49 changed files with 299 additions and 357 deletions

View File

@@ -1,8 +1,7 @@
// A test node that exports a function which returns a resolving promise
var when = require("when");
module.exports = function(RED) {
return when.promise(function(resolve,reject) {
return new Promise(function(resolve,reject) {
function TestNode(n) {}
RED.nodes.registerType("test-node-2",TestNode);
resolve();

View File

@@ -1,8 +1,7 @@
// A test node that exports a function which returns a rejecting promise
var when = require("when");
module.exports = function(RED) {
return when.promise(function(resolve,reject) {
return new Promise(function(resolve,reject) {
reject("fail");
});
}