Skip to content

Commit 083dbcd

Browse files
update web test-runner and remove temp summaryReporter workaournd (#3320)
* update web test-runner and remove temp summaryReporter workaournd * Update error reporting to show in context of the test file and as a summary at the bottom
1 parent d2e3971 commit 083dbcd

3 files changed

Lines changed: 7 additions & 15 deletions

File tree

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
"devDependencies": {
8181
"@types/node": "20.0.0",
8282
"@types/parse5": "^7.0.0",
83-
"@web/test-runner": "^0.20.1",
83+
"@web/test-runner": "^0.20.2",
8484
"@web/test-runner-playwright": "^0.11.0",
8585
"chai": "^4.5.0",
8686
"chai-dom": "^1.12.1",

web-test-runner.config.mjs

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,8 @@
11
import {
22
summaryReporter,
3-
defaultReporter,
4-
dotReporter
3+
defaultReporter
54
} from '@web/test-runner'
65

7-
// There is a bug in the summaryReporter made with this PR https://github.com/modernweb-dev/web/pull/2126
8-
// It captures the buffered logger into cachedLogger for reuse later for the test run finished error reporting
9-
// But the buffered logger in finished its buffer flush before this test error reporting so these logs go nowhere
10-
// to resolve this for now reusing dotReporter which reports errors well but disabled its . test reporting
11-
const errorReporter = dotReporter()
12-
delete errorReporter.reportTestFileResults
13-
146
const config = {
157
testRunnerHtml: (testFramework) => `
168
<html lang="en">
@@ -69,7 +61,7 @@ const config = {
6961
'test/attributes/**/*.js',
7062
'test/core/**/*.js'
7163
],
72-
reporters: [summaryReporter({ flatten: false }), errorReporter, defaultReporter({ reportTestProgress: true, reportTestResults: false })]
64+
reporters: [summaryReporter({ flatten: false, reportTestLogs: false, reportTestErrors: true }), defaultReporter({ reportTestProgress: true, reportTestResults: true })]
7365
}
7466

7567
export default config

0 commit comments

Comments
 (0)