From 1c30563ffc5679f519e7cb1d1c6aa454517deade Mon Sep 17 00:00:00 2001 From: Christopher Allford <6451942+ObliviousHarmony@users.noreply.github.com> Date: Fri, 6 Oct 2023 15:41:47 -0700 Subject: [PATCH] Separate PHP and JS Unit Tests (#40639) Since some projects might have both kinds of tests we are going to have a `test:php` and a `test:js` script for each. --- .../js/ai/changelog/update-separate-php-and-js-tests | 4 ++++ packages/js/ai/package.json | 3 ++- .../js/api/changelog/update-separate-php-and-js-tests | 4 ++++ packages/js/api/package.json | 3 ++- .../changelog/update-separate-php-and-js-tests | 4 ++++ packages/js/block-templates/package.json | 3 ++- .../changelog/update-separate-php-and-js-tests | 4 ++++ packages/js/components/package.json | 3 ++- .../changelog/update-separate-php-and-js-tests | 4 ++++ packages/js/csv-export/package.json | 3 ++- .../changelog/update-separate-php-and-js-tests | 4 ++++ packages/js/currency/package.json | 3 ++- .../changelog/update-separate-php-and-js-tests | 4 ++++ packages/js/customer-effort-score/package.json | 3 ++- .../js/data/changelog/update-separate-php-and-js-tests | 4 ++++ packages/js/data/package.json | 3 ++- .../js/date/changelog/update-separate-php-and-js-tests | 4 ++++ packages/js/date/package.json | 3 ++- .../changelog/update-separate-php-and-js-tests | 4 ++++ packages/js/experimental/package.json | 3 ++- .../explat/changelog/update-separate-php-and-js-tests | 4 ++++ packages/js/explat/package.json | 3 ++- .../changelog/update-separate-php-and-js-tests | 4 ++++ packages/js/integrate-plugin/package.json | 3 ++- .../changelog/update-separate-php-and-js-tests | 4 ++++ packages/js/navigation/package.json | 3 ++- .../number/changelog/update-separate-php-and-js-tests | 4 ++++ packages/js/number/package.json | 3 ++- .../changelog/update-separate-php-and-js-tests | 4 ++++ packages/js/onboarding/package.json | 3 ++- .../changelog/update-separate-php-and-js-tests | 4 ++++ packages/js/product-editor/package.json | 3 ++- plugins/woocommerce-admin/package.json | 3 ++- plugins/woocommerce-docs/package.json | 7 +++++-- .../changelog/update-separate-php-and-js-tests | 4 ++++ plugins/woocommerce/package.json | 10 +++++++--- tools/code-analyzer/package.json | 3 ++- tools/monorepo-utils/package.json | 3 ++- 38 files changed, 118 insertions(+), 24 deletions(-) create mode 100644 packages/js/ai/changelog/update-separate-php-and-js-tests create mode 100644 packages/js/api/changelog/update-separate-php-and-js-tests create mode 100644 packages/js/block-templates/changelog/update-separate-php-and-js-tests create mode 100644 packages/js/components/changelog/update-separate-php-and-js-tests create mode 100644 packages/js/csv-export/changelog/update-separate-php-and-js-tests create mode 100644 packages/js/currency/changelog/update-separate-php-and-js-tests create mode 100644 packages/js/customer-effort-score/changelog/update-separate-php-and-js-tests create mode 100644 packages/js/data/changelog/update-separate-php-and-js-tests create mode 100644 packages/js/date/changelog/update-separate-php-and-js-tests create mode 100644 packages/js/experimental/changelog/update-separate-php-and-js-tests create mode 100644 packages/js/explat/changelog/update-separate-php-and-js-tests create mode 100644 packages/js/integrate-plugin/changelog/update-separate-php-and-js-tests create mode 100644 packages/js/navigation/changelog/update-separate-php-and-js-tests create mode 100644 packages/js/number/changelog/update-separate-php-and-js-tests create mode 100644 packages/js/onboarding/changelog/update-separate-php-and-js-tests create mode 100644 packages/js/product-editor/changelog/update-separate-php-and-js-tests create mode 100644 plugins/woocommerce/changelog/update-separate-php-and-js-tests diff --git a/packages/js/ai/changelog/update-separate-php-and-js-tests b/packages/js/ai/changelog/update-separate-php-and-js-tests new file mode 100644 index 00000000000..12fd177d1fa --- /dev/null +++ b/packages/js/ai/changelog/update-separate-php-and-js-tests @@ -0,0 +1,4 @@ +Significance: patch +Type: dev +Comment: This is just a change to developer commands. + diff --git a/packages/js/ai/package.json b/packages/js/ai/package.json index b13cf1ecc13..fc18941a737 100644 --- a/packages/js/ai/package.json +++ b/packages/js/ai/package.json @@ -78,7 +78,8 @@ "changelog": "composer exec -- changelogger", "clean": "pnpm exec rimraf tsconfig.tsbuildinfo build build-*", "build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name", - "test": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name", + "test": "pnpm test:js", + "test:js": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name --", "lint": "eslint --output-file eslint_report.json --format json src", "build:js": "tsc --project tsconfig.json && tsc --project tsconfig-cjs.json", "build:css": "webpack", diff --git a/packages/js/api/changelog/update-separate-php-and-js-tests b/packages/js/api/changelog/update-separate-php-and-js-tests new file mode 100644 index 00000000000..12fd177d1fa --- /dev/null +++ b/packages/js/api/changelog/update-separate-php-and-js-tests @@ -0,0 +1,4 @@ +Significance: patch +Type: dev +Comment: This is just a change to developer commands. + diff --git a/packages/js/api/package.json b/packages/js/api/package.json index d647ddf60c8..6dd6ec27b88 100644 --- a/packages/js/api/package.json +++ b/packages/js/api/package.json @@ -32,7 +32,8 @@ "scripts": { "turbo:build": "pnpm run clean && npm run compile", "turbo:test": "jest", - "test": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name", + "test": "pnpm test:js", + "test:js": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name", "prepare": "composer install", "changelog": "composer exec -- changelogger", "clean": "rm -rf ./dist ./tsconfig.tsbuildinfo", diff --git a/packages/js/block-templates/changelog/update-separate-php-and-js-tests b/packages/js/block-templates/changelog/update-separate-php-and-js-tests new file mode 100644 index 00000000000..12fd177d1fa --- /dev/null +++ b/packages/js/block-templates/changelog/update-separate-php-and-js-tests @@ -0,0 +1,4 @@ +Significance: patch +Type: dev +Comment: This is just a change to developer commands. + diff --git a/packages/js/block-templates/package.json b/packages/js/block-templates/package.json index b4a32b6943b..db48c18cee1 100644 --- a/packages/js/block-templates/package.json +++ b/packages/js/block-templates/package.json @@ -65,7 +65,8 @@ "changelog": "composer exec -- changelogger", "clean": "pnpm exec rimraf tsconfig.tsbuildinfo build build-*", "build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name", - "test": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name", + "test": "pnpm test:js", + "test:js": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name", "lint": "eslint --output-file eslint_report.json --format json src", "build:js": "tsc --project tsconfig.json && tsc --project tsconfig-cjs.json", "build:css": "webpack", diff --git a/packages/js/components/changelog/update-separate-php-and-js-tests b/packages/js/components/changelog/update-separate-php-and-js-tests new file mode 100644 index 00000000000..12fd177d1fa --- /dev/null +++ b/packages/js/components/changelog/update-separate-php-and-js-tests @@ -0,0 +1,4 @@ +Significance: patch +Type: dev +Comment: This is just a change to developer commands. + diff --git a/packages/js/components/package.json b/packages/js/components/package.json index c84f58dd95a..f9a6257df9d 100644 --- a/packages/js/components/package.json +++ b/packages/js/components/package.json @@ -153,7 +153,8 @@ "prepare": "composer install", "changelog": "composer exec -- changelogger", "build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name", - "test": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name", + "test": "pnpm test:js", + "test:js": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name", "lint": "eslint --output-file eslint_report.json --format json --ext=js,ts,tsx src", "build:js": "tsc --project tsconfig.json && tsc --project tsconfig-cjs.json", "build:css": "webpack", diff --git a/packages/js/csv-export/changelog/update-separate-php-and-js-tests b/packages/js/csv-export/changelog/update-separate-php-and-js-tests new file mode 100644 index 00000000000..12fd177d1fa --- /dev/null +++ b/packages/js/csv-export/changelog/update-separate-php-and-js-tests @@ -0,0 +1,4 @@ +Significance: patch +Type: dev +Comment: This is just a change to developer commands. + diff --git a/packages/js/csv-export/package.json b/packages/js/csv-export/package.json index 2796700ad95..90a122f87f5 100644 --- a/packages/js/csv-export/package.json +++ b/packages/js/csv-export/package.json @@ -40,7 +40,8 @@ "changelog": "composer exec -- changelogger", "clean": "pnpm exec rimraf tsconfig.tsbuildinfo build build-*", "build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name", - "test": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name", + "test": "pnpm test:js", + "test:js": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name", "lint": "eslint --output-file eslint_report.json --format json src", "start": "concurrently \"tsc --project tsconfig.json --watch\" \"tsc --project tsconfig-cjs.json --watch\"", "prepack": "pnpm run clean && pnpm run build", diff --git a/packages/js/currency/changelog/update-separate-php-and-js-tests b/packages/js/currency/changelog/update-separate-php-and-js-tests new file mode 100644 index 00000000000..12fd177d1fa --- /dev/null +++ b/packages/js/currency/changelog/update-separate-php-and-js-tests @@ -0,0 +1,4 @@ +Significance: patch +Type: dev +Comment: This is just a change to developer commands. + diff --git a/packages/js/currency/package.json b/packages/js/currency/package.json index e89fa8ebb22..8c7770e2bed 100644 --- a/packages/js/currency/package.json +++ b/packages/js/currency/package.json @@ -43,7 +43,8 @@ "changelog": "composer exec -- changelogger", "clean": "pnpm exec rimraf tsconfig.tsbuildinfo build build-*", "build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name", - "test": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name", + "test": "pnpm test:js", + "test:js": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name", "lint": "eslint --output-file eslint_report.json --format json src", "start": "concurrently \"tsc --project tsconfig.json --watch\" \"tsc --project tsconfig-cjs.json --watch\"", "prepack": "pnpm run clean && pnpm run build", diff --git a/packages/js/customer-effort-score/changelog/update-separate-php-and-js-tests b/packages/js/customer-effort-score/changelog/update-separate-php-and-js-tests new file mode 100644 index 00000000000..12fd177d1fa --- /dev/null +++ b/packages/js/customer-effort-score/changelog/update-separate-php-and-js-tests @@ -0,0 +1,4 @@ +Significance: patch +Type: dev +Comment: This is just a change to developer commands. + diff --git a/packages/js/customer-effort-score/package.json b/packages/js/customer-effort-score/package.json index 88304dfd4df..dd8f46fcea6 100644 --- a/packages/js/customer-effort-score/package.json +++ b/packages/js/customer-effort-score/package.json @@ -79,7 +79,8 @@ "changelog": "composer exec -- changelogger", "clean": "pnpm exec rimraf tsconfig.tsbuildinfo build build-*", "build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name", - "test": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name", + "test": "pnpm test:js", + "test:js": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name", "lint": "eslint --output-file eslint_report.json --format json src", "build:js": "tsc --project tsconfig.json && tsc --project tsconfig-cjs.json", "build:css": "webpack", diff --git a/packages/js/data/changelog/update-separate-php-and-js-tests b/packages/js/data/changelog/update-separate-php-and-js-tests new file mode 100644 index 00000000000..12fd177d1fa --- /dev/null +++ b/packages/js/data/changelog/update-separate-php-and-js-tests @@ -0,0 +1,4 @@ +Significance: patch +Type: dev +Comment: This is just a change to developer commands. + diff --git a/packages/js/data/package.json b/packages/js/data/package.json index b4235253e43..f091ecf69af 100644 --- a/packages/js/data/package.json +++ b/packages/js/data/package.json @@ -86,7 +86,8 @@ "changelog": "composer exec -- changelogger", "clean": "pnpm exec rimraf tsconfig.tsbuildinfo build build-*", "build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name", - "test": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name", + "test": "pnpm test:js", + "test:js": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name", "lint": "eslint --output-file eslint_report.json --format json src", "start": "concurrently \"tsc --project tsconfig.json --watch\" \"tsc --project tsconfig-cjs.json --watch\"", "prepack": "pnpm run clean && pnpm run build", diff --git a/packages/js/date/changelog/update-separate-php-and-js-tests b/packages/js/date/changelog/update-separate-php-and-js-tests new file mode 100644 index 00000000000..12fd177d1fa --- /dev/null +++ b/packages/js/date/changelog/update-separate-php-and-js-tests @@ -0,0 +1,4 @@ +Significance: patch +Type: dev +Comment: This is just a change to developer commands. + diff --git a/packages/js/date/package.json b/packages/js/date/package.json index f4702b0132f..c3a4474370c 100644 --- a/packages/js/date/package.json +++ b/packages/js/date/package.json @@ -63,7 +63,8 @@ "changelog": "composer exec -- changelogger", "clean": "pnpm exec rimraf tsconfig.tsbuildinfo build build-*", "build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name", - "test": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name", + "test": "pnpm test:js", + "test:js": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name", "lint": "eslint --output-file eslint_report.json --format json src", "start": "concurrently \"tsc --project tsconfig.json --watch\" \"tsc --project tsconfig-cjs.json --watch\"", "prepack": "pnpm run clean && pnpm run build", diff --git a/packages/js/experimental/changelog/update-separate-php-and-js-tests b/packages/js/experimental/changelog/update-separate-php-and-js-tests new file mode 100644 index 00000000000..12fd177d1fa --- /dev/null +++ b/packages/js/experimental/changelog/update-separate-php-and-js-tests @@ -0,0 +1,4 @@ +Significance: patch +Type: dev +Comment: This is just a change to developer commands. + diff --git a/packages/js/experimental/package.json b/packages/js/experimental/package.json index 935891113bb..8cf6c8b762f 100644 --- a/packages/js/experimental/package.json +++ b/packages/js/experimental/package.json @@ -89,7 +89,8 @@ "changelog": "composer exec -- changelogger", "clean": "pnpm exec rimraf tsconfig.tsbuildinfo build build-*", "build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name", - "test": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name", + "test": "pnpm test:js", + "test:js": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name", "lint": "eslint --output-file eslint_report.json --format json src", "build:js": "tsc --project tsconfig.json && tsc --project tsconfig-cjs.json", "build:css": "webpack", diff --git a/packages/js/explat/changelog/update-separate-php-and-js-tests b/packages/js/explat/changelog/update-separate-php-and-js-tests new file mode 100644 index 00000000000..12fd177d1fa --- /dev/null +++ b/packages/js/explat/changelog/update-separate-php-and-js-tests @@ -0,0 +1,4 @@ +Significance: patch +Type: dev +Comment: This is just a change to developer commands. + diff --git a/packages/js/explat/package.json b/packages/js/explat/package.json index 6bd11158294..54930fab577 100644 --- a/packages/js/explat/package.json +++ b/packages/js/explat/package.json @@ -61,7 +61,8 @@ "changelog": "composer exec -- changelogger", "clean": "pnpm exec rimraf tsconfig.tsbuildinfo build build-*", "build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name", - "test": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name", + "test": "pnpm test:js", + "test:js": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name", "lint": "eslint --output-file eslint_report.json --format json src", "start": "concurrently \"tsc --project tsconfig.json --watch\" \"tsc --project tsconfig-cjs.json --watch\"", "prepack": "pnpm run clean && pnpm run build", diff --git a/packages/js/integrate-plugin/changelog/update-separate-php-and-js-tests b/packages/js/integrate-plugin/changelog/update-separate-php-and-js-tests new file mode 100644 index 00000000000..12fd177d1fa --- /dev/null +++ b/packages/js/integrate-plugin/changelog/update-separate-php-and-js-tests @@ -0,0 +1,4 @@ +Significance: patch +Type: dev +Comment: This is just a change to developer commands. + diff --git a/packages/js/integrate-plugin/package.json b/packages/js/integrate-plugin/package.json index 35e43417f3a..806a24cad10 100644 --- a/packages/js/integrate-plugin/package.json +++ b/packages/js/integrate-plugin/package.json @@ -68,7 +68,8 @@ "changelog": "composer exec -- changelogger", "clean": "pnpm exec rimraf tsconfig.tsbuildinfo build build-*", "build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name", - "test": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name", + "test": "pnpm test:js", + "test:js": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name", "lint": "eslint --output-file eslint_report.json --format json src", "build:js": "tsc --project tsconfig.json && tsc --project tsconfig-cjs.json", "start": "concurrently \"tsc --project tsconfig.json --watch\" \"tsc --project tsconfig-cjs.json --watch\" \"webpack --watch\"", diff --git a/packages/js/navigation/changelog/update-separate-php-and-js-tests b/packages/js/navigation/changelog/update-separate-php-and-js-tests new file mode 100644 index 00000000000..12fd177d1fa --- /dev/null +++ b/packages/js/navigation/changelog/update-separate-php-and-js-tests @@ -0,0 +1,4 @@ +Significance: patch +Type: dev +Comment: This is just a change to developer commands. + diff --git a/packages/js/navigation/package.json b/packages/js/navigation/package.json index 4f5f84da9ff..1db264e3e20 100644 --- a/packages/js/navigation/package.json +++ b/packages/js/navigation/package.json @@ -51,7 +51,8 @@ "changelog": "composer exec -- changelogger", "clean": "pnpm exec rimraf tsconfig.tsbuildinfo build build-*", "build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name", - "test": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name", + "test": "pnpm test:js", + "test:js": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name", "lint": "eslint --output-file eslint_report.json --format json src", "start": "concurrently \"tsc --project tsconfig.json --watch\" \"tsc --project tsconfig-cjs.json --watch\"", "prepack": "pnpm run clean && pnpm run build", diff --git a/packages/js/number/changelog/update-separate-php-and-js-tests b/packages/js/number/changelog/update-separate-php-and-js-tests new file mode 100644 index 00000000000..12fd177d1fa --- /dev/null +++ b/packages/js/number/changelog/update-separate-php-and-js-tests @@ -0,0 +1,4 @@ +Significance: patch +Type: dev +Comment: This is just a change to developer commands. + diff --git a/packages/js/number/package.json b/packages/js/number/package.json index ea3ddffece2..2527f2dbcb5 100644 --- a/packages/js/number/package.json +++ b/packages/js/number/package.json @@ -37,7 +37,8 @@ "changelog": "composer exec -- changelogger", "clean": "pnpm exec rimraf tsconfig.tsbuildinfo build build-*", "build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name", - "test": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name", + "test": "pnpm test:js", + "test:js": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name", "lint": "eslint --output-file eslint_report.json --format json src", "start": "concurrently \"tsc --project tsconfig.json --watch\" \"tsc --project tsconfig-cjs.json --watch\"", "prepack": "pnpm run clean && pnpm run build", diff --git a/packages/js/onboarding/changelog/update-separate-php-and-js-tests b/packages/js/onboarding/changelog/update-separate-php-and-js-tests new file mode 100644 index 00000000000..12fd177d1fa --- /dev/null +++ b/packages/js/onboarding/changelog/update-separate-php-and-js-tests @@ -0,0 +1,4 @@ +Significance: patch +Type: dev +Comment: This is just a change to developer commands. + diff --git a/packages/js/onboarding/package.json b/packages/js/onboarding/package.json index 3efbf46491c..89ad9b8ba36 100644 --- a/packages/js/onboarding/package.json +++ b/packages/js/onboarding/package.json @@ -79,7 +79,8 @@ "build:js": "tsc --project tsconfig.json && tsc --project tsconfig-cjs.json", "build:css": "webpack", "start": "concurrently \"tsc --project tsconfig.json --watch\" \"tsc --project tsconfig-cjs.json --watch\" \"webpack --watch\"", - "test": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name", + "test": "pnpm test:js", + "test:js": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name", "prepack": "pnpm run clean && pnpm run build", "lint:fix": "eslint src --fix", "test-staged": "jest --bail --config ./jest.config.json --findRelatedTests" diff --git a/packages/js/product-editor/changelog/update-separate-php-and-js-tests b/packages/js/product-editor/changelog/update-separate-php-and-js-tests new file mode 100644 index 00000000000..12fd177d1fa --- /dev/null +++ b/packages/js/product-editor/changelog/update-separate-php-and-js-tests @@ -0,0 +1,4 @@ +Significance: patch +Type: dev +Comment: This is just a change to developer commands. + diff --git a/packages/js/product-editor/package.json b/packages/js/product-editor/package.json index 68c843549ea..c099824a1dc 100644 --- a/packages/js/product-editor/package.json +++ b/packages/js/product-editor/package.json @@ -122,7 +122,8 @@ "changelog": "composer exec -- changelogger", "clean": "pnpm exec rimraf tsconfig.tsbuildinfo build build-*", "build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name", - "test": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name", + "test": "pnpm test:js", + "test:js": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name", "lint": "eslint --output-file eslint_report.json --format json src", "build:js": "tsc --project tsconfig.json && tsc --project tsconfig-cjs.json", "build:css": "webpack", diff --git a/plugins/woocommerce-admin/package.json b/plugins/woocommerce-admin/package.json index 662cfbf7386..764ee8ae5ef 100644 --- a/plugins/woocommerce-admin/package.json +++ b/plugins/woocommerce-admin/package.json @@ -14,7 +14,8 @@ "turbo:test": "pnpm run test:client", "analyze": "cross-env NODE_ENV=production ANALYZE=true webpack", "build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name", - "test": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name", + "test": "pnpm test:js", + "test:js": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name", "lint": "pnpm run lint:js && pnpm run lint:css", "build:feature-config": "php ../woocommerce/bin/generate-feature-config.php", "clean": "rimraf ../woocommerce/assets/client/admin/*", diff --git a/plugins/woocommerce-docs/package.json b/plugins/woocommerce-docs/package.json index 2df2fd2e1fd..b015bf0e52c 100644 --- a/plugins/woocommerce-docs/package.json +++ b/plugins/woocommerce-docs/package.json @@ -7,8 +7,11 @@ "build": "wp-scripts build", "start": "wp-scripts start", "postinstall": "composer install", - "test:env-setup": "wp-env start && wp-env run cli --env-cwd=wp-content/plugins/woocommerce-docs composer install", - "test:unit": "pnpm run test:env-setup && wp-env run tests-cli vendor/bin/phpunit --env-cwd=wp-content/plugins/woocommerce-docs" + "test": "pnpm test:php", + "test:env:start": "wp-env start && wp-env run cli --env-cwd=wp-content/plugins/woocommerce-docs composer install", + "test:php": "wp-env run tests-cli vendor/bin/phpunit --env-cwd=wp-content/plugins/woocommerce-docs", + "test:env-setup": "pnpm test:env:start", + "test:unit": "pnpm test:env:start && pnpm test:php" }, "keywords": [], "author": "", diff --git a/plugins/woocommerce/changelog/update-separate-php-and-js-tests b/plugins/woocommerce/changelog/update-separate-php-and-js-tests new file mode 100644 index 00000000000..12fd177d1fa --- /dev/null +++ b/plugins/woocommerce/changelog/update-separate-php-and-js-tests @@ -0,0 +1,4 @@ +Significance: patch +Type: dev +Comment: This is just a change to developer commands. + diff --git a/plugins/woocommerce/package.json b/plugins/woocommerce/package.json index 20bf5fae1a0..c757584f92b 100644 --- a/plugins/woocommerce/package.json +++ b/plugins/woocommerce/package.json @@ -19,7 +19,8 @@ "postinstall": "composer install", "changelog": "composer exec -- changelogger", "build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name", - "test": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name", + "test": "pnpm test:js", + "test:js": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name", "lint": "pnpm lint:php", "build:feature-config": "php bin/generate-feature-config.php", "build:zip": "./bin/build-zip.sh", @@ -48,8 +49,11 @@ "make:collection": "pnpm exec wc-api-tests make:collection", "e2e:debug": "pnpm exec wc-e2e test:e2e-debug", "e2e:dev": "pnpm exec wc-e2e test:e2e-dev", - "test:unit": "./vendor/bin/phpunit -c ./phpunit.xml", - "test:unit:env": "wp-env run --env-cwd='wp-content/plugins/woocommerce' tests-cli vendor/bin/phpunit -c phpunit.xml --verbose", + "test:env:start": "pnpm env:test", + "test:php": "./vendor/bin/phpunit -c ./phpunit.xml", + "test:php:env": "wp-env run --env-cwd='wp-content/plugins/woocommerce' tests-cli vendor/bin/phpunit -c phpunit.xml --verbose", + "test:unit": "pnpm test:php", + "test:unit:env": "pnpm test:php:env", "makepot": "composer run-script makepot", "packages:fix:textdomain": "node ./bin/package-update-textdomain.js" }, diff --git a/tools/code-analyzer/package.json b/tools/code-analyzer/package.json index 8509dd26826..c6e6c22f94a 100644 --- a/tools/code-analyzer/package.json +++ b/tools/code-analyzer/package.json @@ -32,7 +32,8 @@ "scripts": { "lint": "eslint . --ext .ts", "turbo:test": "jest", - "test": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name", + "test": "pnpm test:js", + "test:js": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name", "analyzer": "node -r ts-node/register ./src/commands/analyzer/index.ts" }, "engines": { diff --git a/tools/monorepo-utils/package.json b/tools/monorepo-utils/package.json index 62f14fc3065..484f9bd608d 100644 --- a/tools/monorepo-utils/package.json +++ b/tools/monorepo-utils/package.json @@ -47,7 +47,8 @@ "lint": "eslint . --ext .ts", "postinstall": "pnpm run build", "turbo:test": "jest", - "test": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name" + "test": "pnpm test:js", + "test:js": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name" }, "engines": { "node": "^16.14.1",