From d32c0f25d4f6cc8839c1345c58721bc7ba70e315 Mon Sep 17 00:00:00 2001 From: Kamran Abdul Aziz Date: Mon, 5 Oct 2026 11:52:26 +0530 Subject: [PATCH] Run the development build so the test suite finds built files in src prepare.php ran `npm run build`, which writes the built files to build/, while the test suite runs against src/. Since core r63983 a test asserts that the jQuery files exist under src/wp-includes/js/jquery/, so every host using the runner fails four tests. Run `npm run build:dev` instead. It writes the built files into src/ and is the same build that WordPress core's own PHPUnit workflow runs. Fixes #350. --- prepare.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/prepare.php b/prepare.php index 16d6d75..d97349f 100644 --- a/prepare.php +++ b/prepare.php @@ -82,7 +82,7 @@ * The following actions are performed: * - Creates a directory to prepare wordpress-develop. * - Clones the WordPress/wordpress-develop repository from GitHub. - * - Install npm dependencies and run the build script. + * - Install npm dependencies and run the development build script. */ // Prepare an array of shell commands to set up the testing environment. perform_operations( @@ -95,8 +95,12 @@ // The '--depth=1' flag creates a shallow clone with a history truncated to the last commit. 'git clone --depth=1 https://github.com/WordPress/wordpress-develop.git ' . escapeshellarg( $runner_vars['WPT_PREPARE_DIR'] ), - // Change directory to the preparation directory, install npm dependencies, and build the project. - 'cd ' . escapeshellarg( $runner_vars['WPT_PREPARE_DIR'] ) . '; npm install && npm run build', + /* + * Change directory to the preparation directory, install npm dependencies, and build the project. + * The development build writes the built files into `src/`, which is the directory the test suite + * runs against. It is the same build that WordPress core's own PHPUnit workflow runs. + */ + 'cd ' . escapeshellarg( $runner_vars['WPT_PREPARE_DIR'] ) . '; npm install && npm run build:dev', ) );