Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure hooks and plugins are included in the mock runtime api #74

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

knolleary
Copy link
Member

Alternative fix to #73 - rather than stub it, expose the real internal plugin api.

@knolleary
Copy link
Member Author

Initial testing suggests more is needed. Parking for now - will merge/release with #73 to unblock some other work that is happening and come back to this another day.

@joepavitt
Copy link
Contributor

Just tried this locally, and this._RED.plugins is undefined in the index.js

@joepavitt
Copy link
Contributor

Mentioned that it should have been this._RED.runtime.plugins

Even with this, we then see different behaviour to core:

Test Helper:

RED.plugins.getByType('node-red-dashboard-2') returns Promise { [ ] }

Node-RED Core:

RED.plugins.getByType('node-red-dashboard-2') returns []

@knolleary
Copy link
Member Author

@joepavitt that is odd. Can't see anything async in either code path that would result in a promise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants