REST API: JS client - QUnit tests for custom namespace route discovery.

Add QUnit tests for the parsing of custom namespace routes. Add a custom schema fixture based on the `wp-js-widgets` plugin. Test that the client can parse the widget namespace in the schema and correctly construct the expected group of models and collections. Also includes a small unrelated QUnit fix to ensure nav-menu test passes when it is loaded without its tests executing as well as a small jshint fix, adding a missing semicolon since [40107].

Props jnylen0.
Fixes #39561.


git-svn-id: https://develop.svn.wordpress.org/trunk@40109 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Adam Silverstein
2017-02-24 18:39:39 +00:00
parent 4414e3c20a
commit ddc4850a04
6 changed files with 610 additions and 4 deletions

View File

@@ -1928,7 +1928,7 @@ themes.RunInstaller = {
// Open the theme preview.
self.view.collection.once( 'query:success', function() {
$( 'div[data-slug="' + slug + '"]' ).trigger( 'click' );
})
});
}
});