[wp-trac] [WordPress Trac] #39264: Add WP-API JS Client unit tests to core

WordPress Trac noreply at wordpress.org
Mon Feb 20 16:23:05 UTC 2017


#39264: Add WP-API JS Client unit tests to core
-----------------------------+------------------------------
 Reporter:  adamsilverstein  |       Owner:  adamsilverstein
     Type:  enhancement      |      Status:  reopened
 Priority:  normal           |   Milestone:  4.7.3
Component:  REST API         |     Version:  4.7
 Severity:  normal           |  Resolution:
 Keywords:  fixed-major      |     Focuses:  javascript
-----------------------------+------------------------------

Comment (by jnylen0):

 @adamsilverstein I prefer my approach in
 https://core.trac.wordpress.org/attachment/ticket/39264/39264.13.diff for
 this. When a new core endpoint is added, the endpoint should be added to
 this list and to the client fixture file. The easiest way to ensure this
 is to make the test fail, which will happen with a strict equality check
 but not with a foreach check.

 I'm also curious why we need `assert && assert.equal` in your patch?

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


More information about the wp-trac mailing list