Skip to content

Commit e6e1efb

Browse files
author
Joe Pavitt
committed
Add plugin stub to runtime
1 parent 6f53b9b commit e6e1efb

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

index.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,20 @@ class NodeTestHelper extends EventEmitter {
214214
return Promise.resolve();
215215
}
216216
};
217+
218+
// mock out the runtime plugins api
219+
const plugins = {
220+
registerPlugin () {
221+
return;
222+
},
223+
getPlugin () {
224+
return;
225+
},
226+
getPluginsByType () {
227+
return [];
228+
}
229+
}
230+
217231
// this._settings.logging = {console:{level:'off'}};
218232
this._settings.available = function() { return false; }
219233

@@ -228,6 +242,7 @@ class NodeTestHelper extends EventEmitter {
228242
util: this._RED.util,
229243
settings: this._settings,
230244
storage: storage,
245+
plugins: plugins,
231246
log: this._log,
232247
nodeApp: express(),
233248
adminApp: this._httpAdmin,

0 commit comments

Comments
 (0)