Skip to content

Commit

Permalink
Merge pull request #73 from joepavitt/master
Browse files Browse the repository at this point in the history
Add plugin stub to runtime
  • Loading branch information
knolleary authored Dec 22, 2023
2 parents 6f53b9b + e6e1efb commit 5e7b157
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,20 @@ class NodeTestHelper extends EventEmitter {
return Promise.resolve();
}
};

// mock out the runtime plugins api
const plugins = {
registerPlugin () {
return;
},
getPlugin () {
return;
},
getPluginsByType () {
return [];
}
}

// this._settings.logging = {console:{level:'off'}};
this._settings.available = function() { return false; }

Expand All @@ -228,6 +242,7 @@ class NodeTestHelper extends EventEmitter {
util: this._RED.util,
settings: this._settings,
storage: storage,
plugins: plugins,
log: this._log,
nodeApp: express(),
adminApp: this._httpAdmin,
Expand Down

0 comments on commit 5e7b157

Please sign in to comment.