Skip to content

Commit

Permalink
Monorepo: Restore and add test coverage config (#39961)
Browse files Browse the repository at this point in the history
* Enable and normalize test coverage commands

* Revert "Code Coverage: remove automation (#28542)"

This reverts commit da5e78803f56ea0fe54f29720c05be037093b97a.

* Revert "Remove remnants of automated code coverage support (#28982)"

This reverts commit 8cc32461b2d3b7e3a4a391c033163e5ebc3822fa.

* Fix starter plugin test broken by #31417

* Plugin tests are now run in the monorepo rather than wp-content/plugins.

* Removed undocumented WP_DEVELOP_DIR variable, documented WORDPRESS_DEVELOP_DIR and WORDPRESS_DIR

* Fixed JS tests in some packages where .scripts.test-js had never been added to composer.json.

---------

Co-authored-by: Brad Jorsch <brad.jorsch@automattic.com>

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/11610578911

Upstream-Ref: Automattic/jetpack@7fadf4a
  • Loading branch information
tbradsha authored and matticbot committed Oct 31, 2024
1 parent 2d8c209 commit c262249
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.0.61-alpha] - unreleased

This is an alpha version! The changes listed here are not final.

### Added
- Enable test coverage.

## [2.0.60] - 2024-10-10
### Changed
- Updated package dependencies.
Expand Down Expand Up @@ -269,6 +276,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- Initial release.

[2.0.61-alpha]: https://github.com/Automattic/i18n-loader-webpack-plugin/compare/v2.0.60...v2.0.61-alpha
[2.0.60]: https://github.com/Automattic/i18n-loader-webpack-plugin/compare/v2.0.59...v2.0.60
[2.0.59]: https://github.com/Automattic/i18n-loader-webpack-plugin/compare/v2.0.58...v2.0.59
[2.0.58]: https://github.com/Automattic/i18n-loader-webpack-plugin/compare/v2.0.57...v2.0.58
Expand Down
5 changes: 4 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,14 @@
"license": "GPL-2.0-or-later",
"require": {},
"require-dev": {
"automattic/jetpack-changelogger": "^4.2.7"
"automattic/jetpack-changelogger": "^4.2.8-alpha"
},
"scripts": {
"test-js": [
"pnpm run test"
],
"test-coverage": [
"pnpm run test-coverage"
]
},
"minimum-stability": "dev",
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@automattic/i18n-loader-webpack-plugin",
"version": "2.0.60",
"version": "2.0.61-alpha",
"description": "A Webpack plugin to load WordPress i18n when Webpack lazy-loads a bundle.",
"homepage": "https://github.com/Automattic/jetpack/tree/HEAD/projects/js-packages/i18n-loader-webpack-plugin/#readme",
"bugs": {
Expand All @@ -14,7 +14,8 @@
"license": "GPL-2.0-or-later",
"author": "Automattic",
"scripts": {
"test": "jest tests"
"test": "jest tests",
"test-coverage": "pnpm run test --coverage --collectCoverageFrom='src/**/*.js' --coverageDirectory=\"$COVERAGE_DIR/js\" --coverageReporters=clover"
},
"dependencies": {
"debug": "^4.3.2"
Expand Down

0 comments on commit c262249

Please sign in to comment.