@web/test-runner-core
Advanced tools
Comparing version 0.10.3 to 0.10.4
# @web/test-runner-core | ||
## 0.10.4 | ||
### Patch Changes | ||
- 43bc451c: add configuration option reporters in coverageConfig to use various istanbul reporters | ||
- fd831b54: fix manual testing HTML tests | ||
## 0.10.3 | ||
@@ -4,0 +11,0 @@ |
@@ -21,6 +21,12 @@ "use strict"; | ||
}); | ||
const report = istanbul_reports_1.default.create('lcov'); | ||
report.execute(context); | ||
const reporters = config.reporters || []; | ||
for (const reporter of reporters) { | ||
const report = istanbul_reports_1.default.create(reporter, { | ||
projectRoot: process.cwd(), | ||
maxCols: process.stdout.columns || 100, | ||
}); | ||
report.execute(context); | ||
} | ||
} | ||
exports.writeCoverageReport = writeCoverageReport; | ||
//# sourceMappingURL=writeCoverageReport.js.map |
@@ -7,2 +7,3 @@ import { Middleware } from '@web/dev-server-core'; | ||
import { TestRunnerPlugin } from '../server/TestRunnerPlugin.js'; | ||
import { ReportType } from 'istanbul-reports'; | ||
export interface CoverageThresholdConfig { | ||
@@ -21,2 +22,3 @@ statements: number; | ||
reportDir: string; | ||
reporters?: ReportType[]; | ||
} | ||
@@ -23,0 +25,0 @@ export interface TestRunnerCoreConfig { |
@@ -29,3 +29,4 @@ "use strict"; | ||
const displayedPath = testImportPath.split('?')[0].substring(1); | ||
const href = `/?${constants_1.PARAM_TEST_FILE}=${encodeURIComponent(testImportPath)}`; | ||
const pagename = displayedPath.endsWith('.html') ? displayedPath : '/'; | ||
const href = `${pagename}?${constants_1.PARAM_TEST_FILE}=${encodeURIComponent(testImportPath)}`; | ||
return `<li><a href="${href}">${displayedPath}</a></li>`; | ||
@@ -32,0 +33,0 @@ } |
{ | ||
"name": "@web/test-runner-core", | ||
"version": "0.10.3", | ||
"version": "0.10.4", | ||
"publishConfig": { | ||
@@ -5,0 +5,0 @@ "access": "public" |
@@ -20,4 +20,11 @@ import reports from 'istanbul-reports'; | ||
const report = reports.create('lcov'); | ||
(report as any).execute(context); | ||
const reporters = config.reporters || []; | ||
for (const reporter of reporters) { | ||
const report = reports.create(reporter, { | ||
projectRoot: process.cwd(), | ||
maxCols: process.stdout.columns || 100, | ||
}); | ||
(report as any).execute(context); | ||
} | ||
} |
@@ -7,2 +7,3 @@ import { Middleware } from '@web/dev-server-core'; | ||
import { TestRunnerPlugin } from '../server/TestRunnerPlugin.js'; | ||
import { ReportType } from 'istanbul-reports'; | ||
@@ -23,2 +24,3 @@ export interface CoverageThresholdConfig { | ||
reportDir: string; | ||
reporters?: ReportType[]; | ||
} | ||
@@ -25,0 +27,0 @@ |
@@ -32,3 +32,4 @@ import { Context, getRequestFilePath } from '@web/dev-server-core'; | ||
const displayedPath = testImportPath.split('?')[0].substring(1); | ||
const href = `/?${PARAM_TEST_FILE}=${encodeURIComponent(testImportPath)}`; | ||
const pagename = displayedPath.endsWith('.html') ? displayedPath : '/'; | ||
const href = `${pagename}?${PARAM_TEST_FILE}=${encodeURIComponent(testImportPath)}`; | ||
return `<li><a href="${href}">${displayedPath}</a></li>`; | ||
@@ -35,0 +36,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
395128
6730