You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the flow contains several 'catch' nodes (which are loaded by test-helper automatically as well as 'status' and 'complete' nodes which possibly will result in the same error), the tests crash with "catch already registered" error.
The reason is probably with this code in index.js:
testFlow.forEach(n=>{if(this._nodeModules.hasOwnProperty(n.type)){// Go find the 'real' core node module and load it...constresult=this._nodeModules[n.type](red);if(result?.then){initPromises.push(result)}preloadedCoreModules.add(this._nodeModules[n.type]);}})
Which loads the core nodes without checking if they are already loaded in preloadedCoreModules.
As a workaround, I'm resetting helper._nodeModules before doing helper.load(), so it will not load any core nodes automatically, and then pass them to helper.load() manually
helper._nodeModules = {}
helper.load(coreNodes, flow, function () {
....
})
The text was updated successfully, but these errors were encountered:
If the flow contains several 'catch' nodes (which are loaded by test-helper automatically as well as 'status' and 'complete' nodes which possibly will result in the same error), the tests crash with "catch already registered" error.
The reason is probably with this code in index.js:
Which loads the core nodes without checking if they are already loaded in
preloadedCoreModules
.As a workaround, I'm resetting
helper._nodeModules
before doinghelper.load()
, so it will not load any core nodes automatically, and then pass them tohelper.load()
manuallyThe text was updated successfully, but these errors were encountered: