You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have some React component tests that make assertions about what internal convenience methods exist in component classes, when they are called, and what arguments they are given. There are also elaborate patches set up to stub out some of those convenience methods. The net result of this:
The test files are unnecessary large and difficult to read
Making simple implementation changes that cause no functional change, or simple changes to the component rendering output, can cause many tests to fail, and getting them working again is often difficult.
The biggest area of concern is static/js/containers/CollectionDetailPage_test.js, but static/js/containers/VideoDetailPage_test.js also needs work and possibly a few others. In general, these tests should not patch internal convenience methods, the nesting of describe/it blocks and creation of custom helper methods in the tests should be kept to a minimum, and the testing of rendering output should be done by just rendering the entire component.
The text was updated successfully, but these errors were encountered:
We have some React component tests that make assertions about what internal convenience methods exist in component classes, when they are called, and what arguments they are given. There are also elaborate patches set up to stub out some of those convenience methods. The net result of this:
The biggest area of concern is
static/js/containers/CollectionDetailPage_test.js
, butstatic/js/containers/VideoDetailPage_test.js
also needs work and possibly a few others. In general, these tests should not patch internal convenience methods, the nesting ofdescribe
/it
blocks and creation of custom helper methods in the tests should be kept to a minimum, and the testing of rendering output should be done by just rendering the entire component.The text was updated successfully, but these errors were encountered: