Testing: Idea for E2E runtime store unhandled action mutations #9061
Labels
[Type] Automated Testing
Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests.
[Type] Enhancement
A suggestion for improvement.
Related: #1084
If a store's reducer returns a new object value for an unhandled action, it can result in significant performance degradation. It is not certain that this currently exists, but we should include test case(s) to assure that it is not introduced. This is difficult to achieve in Gutenberg because there are many stores, and while a test case could be added for each package's reducer, this is not necessarily obvious to developers nor the most efficient approach.
Instead, we might consider introducing this to end-to-end tests, leveraging the new data plugin API (#8341). The plugin would simply be responsible for hooking in to the registration of a store, running the simple test case (d0158e0) and throwing an error to trigger the E2E failure. This would capture all unnecessary action handling for the default set of editor stores.
The text was updated successfully, but these errors were encountered: