Wordpress/tests/qunit
Jonathan Desrosiers 2ae5bb324d REST API: Preserve unknown, respect `null` in server-side block rendering.
- Skips validation where there is no attribute definition, but keeps the attribute value. Previously, the attribute would be omitted from the attributes passed to `render_callback`. Notably, this resolves an issue where `render_callback` cannot receive a block's `align` and `customClassName` attribute values, since these are defined as a client-side filter.
- Validates `null` as a proper value in its own right. Previously, a client implementation of a block could track `{“attribute":null}` as an explicitly empty value, and the server would wrongly initiate defaulting behavior. The new behavior will now only populate a default value if the attribute is not defined at all, including when unset in its being invalid per the attribute schema. 

Props aduth, noisysocks, youknowriad, danielbachhuber.

Merges [43918] to trunk.

See #45145 for the patch, #45098 for the original ticket.

git-svn-id: https://develop.svn.wordpress.org/trunk@44269 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-17 17:59:44 +00:00
..
fixtures REST API: Preserve unknown, respect `null` in server-side block rendering. 2018-12-17 17:59:44 +00:00
vendor Customizer: Add QUnit tests for menus. 2015-08-03 19:27:27 +00:00
wp-admin/js Customize: Allow 0:00-0:59 in date/time control when 24-hour time used. 2017-10-30 16:39:06 +00:00
wp-includes/js REST API: Fix failing tests after [43584] and [43585]. 2018-08-28 13:04:07 +00:00
.jshintrc
index.html Once upon a midnight dreary, while I coded, weak and weary, 2018-05-23 10:04:22 +00:00