You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import{jasmineTestRunnerConfig}from"web-test-runner-jasmine";import{playwrightLauncher}from"@web/test-runner-playwright";import{puppeteerLauncher}from"@web/test-runner-puppeteer";import{defaultReporter}from"@web/test-runner";import{junitReporter}from"@web/test-runner-junit-reporter";importrollupInjectfrom"@rollup/plugin-inject";importrollupLegacyfrom"@rollup/plugin-legacy";import{fromRollup}from"@web/dev-server-rollup";constinject=fromRollup(rollupInject);constlegacy=fromRollup(rollupLegacy);/** * @type {import("@web/test-runner").TestRunnerConfig} */exportdefault{
...jasmineTestRunnerConfig(),"concurrency": 10,"coverage": true,"nodeResolve": true,// "watch": true,// in a monorepo you need to set set the root dir to resolve modules"rootDir": "","files": "src/app/**/*.spec.mjs",// "debug": true,"browsers": [// puppeteerLauncher({})playwrightLauncher({"product": "chromium","launchOptions": {"headless": true}})],"plugins": [legacy({"node_modules/jquery/dist/jquery.js": "$"}),inject({"$": "jquery","fetchMock": "fetch-mock/esm/client","Chart": ["chart.js/auto","Chart"]})],"reporters": [// use the default reporter only for reporting test progressdefaultReporter({"reportTestResults": false,"reportTestProgress": true}),// use another reporter to report test resultsjunitReporter({"outputPath": "./results/test-results.xml",// default `'./test-results.xml'`"reportLogs": true// default `false`})]};
Shell:
> npx web-test-runner --config web-test-runner.config.mjs
Chromium: |██████████████████████████████| 11/11 test files | 39 passed, 0 failed
Code coverage: 78.18 %
View full coverage report at coverage\lcov-report\index.html
Finished running tests in 7.5s, all tests passed! 🎉
The text was updated successfully, but these errors were encountered:
When using
@web/test-runner-junit-reporter
, the generated report is emptyExpected
Accurate JUnit XML report
Docs: https://modern-web.dev/docs/test-runner/reporters/junit/
Actual
reults/test-results.xml
:Additional info
web-test-runner.config.mjs
:The text was updated successfully, but these errors were encountered: