Wordpress/tests/qunit
Adam Silverstein 399db7ac03 WP-API JS Client: Add helpers to get a model or collection by route.
Add two new helper functions, `wp.api.getModelByRoute` and `wp.api.getCollectionByRoute`. Passed a route, they return the matching model or collection, or `undefined` if none is found.

Also adds tests to verify these functions work as expected.

Props rcutmore.
Fixes #41111.


git-svn-id: https://develop.svn.wordpress.org/trunk@41334 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-04 16:00:28 +00:00
..
fixtures REST API: Update the fixture data for `wp-api.js` tests. 2017-07-26 03:52:41 +00:00
vendor Customizer: Add QUnit tests for menus. 2015-08-03 19:27:27 +00:00
wp-admin/js Widgets: Add accessibility mode support for TinyMCE-enhanced Text and Media widgets (Video, Audio, Images). 2017-06-25 18:47:13 +00:00
wp-includes/js WP-API JS Client: Add helpers to get a model or collection by route. 2017-09-04 16:00:28 +00:00
.jshintrc
index.html REST API: Allow overriding `jQuery.ajax` calls from within wp-admin 2017-08-02 16:44:05 +00:00