[wp-trac] [WordPress Trac] #35857: Add QUnit tests for Customizer preview, including Selective Refresh

WordPress Trac noreply at wordpress.org
Fri Mar 11 21:54:51 UTC 2016


#35857: Add QUnit tests for Customizer preview, including Selective Refresh
----------------------------+---------------------------
 Reporter:  westonruter     |       Owner:  ryankienstra
     Type:  task (blessed)  |      Status:  assigned
 Priority:  normal          |   Milestone:  4.5
Component:  Customize       |     Version:  3.4
 Severity:  normal          |  Resolution:
 Keywords:  needs-patch     |     Focuses:  javascript
----------------------------+---------------------------
Changes (by westonruter):

 * owner:  westonruter => ryankienstra


Comment:

 Something that the QUnit tests for the Customizer thus far have somewhat
 lacked in thus far is properly setting up and tearing down the global
 state with each test. The tests for the Customizer pane largely are adding
 and removing things from the global state without regard for how those
 will impact other tests. In other words, they are more integration tests
 than unit tests… and they can be more fragile since they aren't
 encapsulated. To make the **unit** tests more robust in the preview, I
 suggest that we be more disciplined from the start at architecting the
 unit tests in a way that teach test does state setup `beforeEach`, and
 tears down any global state `afterEach`.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/35857#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list