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

fix: correct behavior of plugins retrieval functions #1316

Merged
merged 1 commit into from
Oct 24, 2020
Merged

fix: correct behavior of plugins retrieval functions #1316

merged 1 commit into from
Oct 24, 2020

Conversation

jmakhack
Copy link
Contributor

Related Issue

Closes #1308

Your solution

Changed the byType method to no longer accept undefined as a valid type. Added the all method to PluginsContainer as the correct way to retrieve all plugins.

How Has This Been Tested?

I ran my changes against the existing tests, making sure that plugins.test.js, modelFields.test.js, validators.test.js, and contentModelToSDL.test.js passed in particular.

I also checked all uses of the byType method within the codebase to ensure that it was never being passed a value of undefined as a means for retrieving all plugins. As a result of this check, I updated the getPlugins function in index.ts to return all plugins when passed a value of undefined. This is expected behavior based on the tests found in plugins.test.js.

Screenshots (if relevant):

N/A

Copy link
Contributor

@brunozoric brunozoric left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything looks good :)

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

Successfully merging this pull request may close these issues.

Fix PluginsContainer.byType method arg and return
3 participants