[wp-trac] [WordPress Trac] #39264: Add WP-API JS Client unit tests to core
WordPress Trac
noreply at wordpress.org
Tue Feb 14 09:19:03 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: has-patch has-unit-tests | Focuses: javascript
--------------------------------------+------------------------------
Comment (by jnylen0):
Here is how to use [attachment:compare-wp-api-fixtures.js] to generate the
`self::$fixture_replacements` array in [attachment:39264.9.diff].
First, clear out the `self::$fixture_replacements` array in your WP
checkout. Then run these commands:
{{{#!sh
phpunit --filter WP_Test_REST_Schema_Initialization
cp tests/qunit/fixtures/wp-api-generated.js wp-api-generated-1class.js
phpunit --filter REST
cp tests/qunit/fixtures/wp-api-generated.js wp-api-generated-REST.js
npm install deep-diff at 0.3.4
node compare-wp-api-fixtures.js
}}}
Finally, paste the results of the last command into the array.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39264#comment:29>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list