fix(runtime): use compatible WordPress jQuery
This commit is contained in:
@@ -40,10 +40,12 @@ test('published post content reaches the front submit editor unchanged', () => {
|
||||
assert.match(editor, /wp_editor\(\(string\) \$ctx\['current_content'\], 'post_content', \$editor_settings\);/);
|
||||
});
|
||||
|
||||
test('front submit uses the registered local jQuery runtime', () => {
|
||||
test('front submit uses the WordPress-managed jQuery runtime', () => {
|
||||
const source = read('src/Core/ScriptsPart1b.php');
|
||||
|
||||
assert.match(source, /wp_register_script\('jquery', \$base_uri \. '\/assets\/js\/runtime\/libs\/jquery\.min\.js', \[\], '1\.9\.1', false\)/);
|
||||
assert.match(source, /wp_enqueue_script\('jquery'\)/);
|
||||
assert.doesNotMatch(source, /wp_deregister_script\('jquery'\)/);
|
||||
assert.doesNotMatch(source, /wp_register_script\('jquery'/);
|
||||
assert.doesNotMatch(source, /jquery-migrate/);
|
||||
|
||||
const page = read('templates/pages/page-submit.php');
|
||||
|
||||
Reference in New Issue
Block a user