Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Significance: patch
Type: changed
Comment: Enable the existing JavaScript test and coverage suites in CI.
2 changes: 2 additions & 0 deletions projects/packages/premium-analytics/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
],
"test-php": "@composer phpunit",
"test-php-coverage": "php -dpcov.directory=. ./vendor/bin/phpunit-select-config phpunit.#.xml.dist --coverage-php \"$COVERAGE_DIR/php.cov\"",
"test-js": "pnpm run test",

ghost Jul 23, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a test-js-coverage command too.

Suggested change
"test-js": "pnpm run test",
"test-js": "pnpm run test",
"test-js-coverage": "pnpm run test --coverage",

Then it looks like you'll also need to update projects/packages/premium-analytics/tests/jest.config.cjs to actually generate coverage, since the needed paths aren't in the default collectCoverageFrom.

Or maybe we should just add the additional wp-build paths to collectCoverageFrom in tools/js-tools/jest/config.coverage.js, since other projects will need them too.

P.S. You should be able to test the coverage locally with jetpack test js-coverage -v packages/premium-analytics.

ghost Jul 23, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or maybe we should just add the additional wp-build paths to collectCoverageFrom in tools/js-tools/jest/config.coverage.js, since other projects will need them too.

I went ahead and did that in #50782.

ghost Jul 27, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for #50782! @anomiex Added test-js-coverage. Rebased and confirmed the report now covers packages/, routes/, and widgets/.

"test-js-coverage": "pnpm run test-coverage",
"build-development": [
"pnpm run build"
],
Expand Down
1 change: 1 addition & 0 deletions projects/packages/premium-analytics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"build-production": "NODE_ENV=production BABEL_ENV=production pnpm run build:wp-build && pnpm run build:strip-unminified-prod && pnpm run build:boot-asset && pnpm run validate",
"storybook": "cd ../../js-packages/storybook && pnpm run storybook:dev",
"test": "jest --config=tests/jest.config.cjs",
"test-coverage": "pnpm run test --coverage",
"typecheck": "tsgo --noEmit",
"validate": "pnpm exec validate-es --no-error-on-unmatched-pattern build/",
"watch": "wp-build --watch"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: changed
Comment: Sync Premium Analytics dependency metadata.

8 changes: 7 additions & 1 deletion projects/plugins/mu-wpcom-plugin/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: changed
Comment: Sync Premium Analytics dependency metadata.

8 changes: 7 additions & 1 deletion projects/plugins/premium-analytics/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: changed
Comment: Sync Premium Analytics dependency metadata.

8 changes: 7 additions & 1 deletion projects/plugins/wpcomsh/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.