From ab747e0c21dffe5135c220494dcae300772b2217 Mon Sep 17 00:00:00 2001 From: Lance Willett Date: Sun, 26 Jul 2026 19:01:37 -0700 Subject: [PATCH 1/2] Docs: Document how to run the QUnit test suite. Adds a README.md section explaining how to run the JavaScript QUnit test suite from a fresh checkout, using `npm run grunt qunit:compiled` to build required files before running the suite. Documents why running `npm run grunt qunit` directly without a prior `npm run build` fails with a `jQuery is not defined` error, since the QUnit runner loads scripts from the built `build/` directory. Fixes #65719. Props lance.willett@automattic.com --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index bb6d06c034651..5a9a46131d508 100644 --- a/README.md +++ b/README.md @@ -97,6 +97,17 @@ npm run test:php -- --filter npm run test:php -- --group ``` +To run the JavaScript (QUnit) tests: + +``` +npm run grunt qunit:compiled +``` + +`qunit:compiled` builds first, then runs the suite. The QUnit runner loads +scripts from the built `build/` directory, so a plain `npm run grunt qunit` +requires a completed `npm run build` first—without a build, every test fails +with a `jQuery is not defined` error. + #### To lint the workflow files GitHub Actions workflows operate in a privileged software supply chain environment, therefore all workflow files must adhere to a high degree of quality and security standards. From 5b6d0003b1a14f9ff64a1cdb0f95caa70a99e905 Mon Sep 17 00:00:00 2001 From: Lance Willett Date: Mon, 27 Jul 2026 07:07:36 -0700 Subject: [PATCH 2/2] Update README.md for cleaner punctuation Thanks mukeshpanchal27 Co-authored-by: Mukesh Panchal --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5a9a46131d508..eb88e407cb612 100644 --- a/README.md +++ b/README.md @@ -105,7 +105,7 @@ npm run grunt qunit:compiled `qunit:compiled` builds first, then runs the suite. The QUnit runner loads scripts from the built `build/` directory, so a plain `npm run grunt qunit` -requires a completed `npm run build` first—without a build, every test fails +requires a completed `npm run build` first without a build, every test fails with a `jQuery is not defined` error. #### To lint the workflow files