From 9ff5d760d51f8a0e6ca6e4dab9e6878f1ee79929 Mon Sep 17 00:00:00 2001 From: devinwalker Date: Thu, 15 Oct 2026 21:30:39 -0700 Subject: [PATCH] Build/Test Tools: Run the `wp.updates` QUnit tests. The QUnit tests and fixture for `wp.updates` were added in [37714], but `tests/qunit/index.html` never loaded them, or `updates.js` itself, so they have never run. This loads the fixture, `updates.js`, and its tests, and fills in the update totals in the fixture so `decrementCount()` has counts to work with. Without them, `decrementCount()` throws. See #66324. --- tests/qunit/fixtures/updates.js | 12 +++++++++++- tests/qunit/index.html | 3 +++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/tests/qunit/fixtures/updates.js b/tests/qunit/fixtures/updates.js index 7e31370814880..4ac38402cf658 100644 --- a/tests/qunit/fixtures/updates.js +++ b/tests/qunit/fixtures/updates.js @@ -59,5 +59,15 @@ window._wpUpdatesSettings = { }; window._wpUpdatesItemCounts = { plugins: {}, - totals: {} + // Matches the update counts in the fixture markup in index.html. + totals: { + counts: { + plugins: 2, + themes: 0, + wordpress: 0, + translations: 0, + total: 2 + }, + title: '2 Plugin Updates' + } }; diff --git a/tests/qunit/index.html b/tests/qunit/index.html index 5054ff954518d..f9033a776151c 100644 --- a/tests/qunit/index.html +++ b/tests/qunit/index.html @@ -85,6 +85,7 @@ + @@ -98,6 +99,7 @@ + +