fix(runtime): use compatible WordPress jQuery

This commit is contained in:
2026-09-05 20:48:18 +08:00
parent d64c4cf1b4
commit 4a12de38cb
3 changed files with 9 additions and 9 deletions
@@ -37,16 +37,16 @@ const header = join([
'inc/helpers/aksrt-header-userbox.php',
]);
test('the public dependency graph is the single local runtime stack', () => {
assert.match(scripts, /wp_deregister_script\('jquery'\)/);
assert.match(scripts, /jquery\.min\.js'[\s\S]*?'1\.9\.1'/);
test('the public dependency graph uses WordPress jQuery with the local runtime stack', () => {
assert.match(scripts, /wp_enqueue_script\('jquery'\)/);
assert.doesNotMatch(scripts, /wp_deregister_script\('jquery'\)/);
assert.doesNotMatch(scripts, /jquery\.min\.js'[\s\S]*?'1\.9\.1'/);
assert.match(scripts, /bootstrap\.min\.css'[\s\S]*?'3\.4\.1'/);
assert.match(scripts, /fontawesome5'[\s\S]*?all\.min\.css'[\s\S]*?'5\.15\.4'/);
assert.match(scripts, /main\.min\.css/);
assert.match(scripts, /loader\.js'[\s\S]*?\['jquery', 'bootstrap'\]/);
assert.match(read('assets/js/runtime/loader.js'), /tbquire\(\['main'\]\)/);
for (const file of [
'assets/js/runtime/libs/jquery.min.js',
'assets/js/runtime/libs/bootstrap.min.js',
'assets/css/bootstrap.min.css',
'assets/fontawesome5/css/all.min.css',