-
Notifications
You must be signed in to change notification settings - Fork 1
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
Unit and e2e test scaffolding for custom blocks #103
Comments
@nerrad Do you have anything abstracted at this point that you might be able to share? |
What I have right now is still somewhat dependent on the gutenberg package as a whole (because current package releases are still a bit buggy (see WordPress/gutenberg#3955 (comment)). However, once I convert our tests over to using the modular published packages I'll be happy to document/share what we're using. Maybe a first step will be to get some documentation, writing that out will help (me at least) work out where wp-cli can aid that with a scaffold command. |
It should be added though, that coming up with a baseline scaffold for custom block tests could be a hard to iron out because test needs can differ widely among custom block implementations. For instance some block authors may just need to test using mocks whereas other block authors may want to test using actual gb packages. However, I suppose a good default would be to have the configuration set to use actual imports and mocks can be implemented at the test level (by block authors if they want)? Also what were you thinking this scaffold command would do/build? |
Basic unit and e2e tests, using the same pattern established by Gutenberg. It could be a prototypical implementation that would need to be modified before use. |
This should be covered by |
We make it easy for WordPress plugin authors to add (unit) tests with
wp scaffold plugin-tests
.It would be helpful to have a similar "standard automated testing" pattern for WordPress block authors.
This could even be used to help prevent scenarios like WordPress/gutenberg#3693 (comment)
Related WordPress/gutenberg#641
Originally WordPress/gutenberg#3706
The text was updated successfully, but these errors were encountered: