Make WordPress Core

Changeset 59356 for trunk/package.json


Ignore:
Timestamp:
11/05/2024 07:59:49 PM (23 months ago)
Author:
desrosj
Message:

Build/Test Tools: Add script for generating code coverage report.

This adds documentation for how to generate code coverage reports to the README.md file.

test:coverage has also been added as an npm script to make it easier to generate a report using the local Docker environment. The script will generate an HTML, PHP, and text report file.

Props pbearne, hellofromTonya, netweb.
Fixes #53414.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:ignore
      •  

        old new  
        1919/docker-compose.override.yml
        2020.env
         21coverage
  • trunk/package.json

    r59347 r59356  
    191191                "test:performance": "wp-scripts test-playwright --config tests/performance/playwright.config.js",
    192192                "test:php": "node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit",
     193                "test:coverage": "npm run test:php -- --coverage-html ./coverage/html/ --coverage-php ./coverage/php/report.php --coverage-text=./coverage/text/report.txt",
    193194                "test:e2e": "wp-scripts test-playwright --config tests/e2e/playwright.config.js",
    194195                "test:visual": "wp-scripts test-playwright --config tests/visual-regression/playwright.config.js",
Note: See TracChangeset for help on using the changeset viewer.