From ddc91e2c0cc52b16c966e7bbb99f6df004a56070 Mon Sep 17 00:00:00 2001 From: Vicente Canales <1157901+vcanales@users.noreply.github.com> Date: Thu, 9 May 2024 09:47:41 -0400 Subject: [PATCH] Tests: use tests-wordpress wp-env for phpunit (#618) Running tests on the `cli` environment causes coflicts with the `dev` environment; the tests will log you out, modify the theme, etc. Running tests on `tests-wordpress` will allow you to run tests along with the `dev` environment without interference. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 98decf9..e5c8488 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ "lint:php:fix": "composer run-script format", "lint:md-docs": "wp-scripts lint-md-docs", "lint:pkg-json": "wp-scripts lint-pkg-json", - "test:php": "npm run test:php:setup && wp-env run cli --env-cwd='wp-content/plugins/create-block-theme' composer run-script test", + "test:php": "npm run test:php:setup && wp-env run tests-wordpress --env-cwd='wp-content/plugins/create-block-theme' composer run-script test", "test:php:watch": "wp-env run cli --env-cwd='wp-content/plugins/create-block-theme' composer run-script test:watch", "test:php:setup": "wp-env start", "packages-update": "wp-scripts packages-update",