mirror of
https://github.com/bigskysoftware/htmx.git
synced 2025-09-26 20:40:41 +00:00
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
This commit is contained in:
parent
d2e39716fb
commit
083dbcdd6f
8
package-lock.json
generated
8
package-lock.json
generated
@ -11,7 +11,7 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "20.0.0",
|
"@types/node": "20.0.0",
|
||||||
"@types/parse5": "^7.0.0",
|
"@types/parse5": "^7.0.0",
|
||||||
"@web/test-runner": "^0.20.1",
|
"@web/test-runner": "^0.20.2",
|
||||||
"@web/test-runner-playwright": "^0.11.0",
|
"@web/test-runner-playwright": "^0.11.0",
|
||||||
"chai": "^4.5.0",
|
"chai": "^4.5.0",
|
||||||
"chai-dom": "^1.12.1",
|
"chai-dom": "^1.12.1",
|
||||||
@ -1251,9 +1251,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/@web/test-runner": {
|
"node_modules/@web/test-runner": {
|
||||||
"version": "0.20.1",
|
"version": "0.20.2",
|
||||||
"resolved": "https://registry.npmjs.org/@web/test-runner/-/test-runner-0.20.1.tgz",
|
"resolved": "https://registry.npmjs.org/@web/test-runner/-/test-runner-0.20.2.tgz",
|
||||||
"integrity": "sha512-MTN8D1WCeCdkUWJIeG9yauUbRkk9g0zGFnBbI5smtPE91NpXFMfRd8nShIvxQnHx9fNTmK+OCYKnOSlq5DLLVA==",
|
"integrity": "sha512-zfEGYEDnS0EI8qgoWFjmtkIXhqP15W40NW3dCaKtbxj5eU0a7E53f3GV/tZGD0GlZKF8d4Fyw+AFrwOJU9Z4GA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@web/browser-logs": "^0.4.0",
|
"@web/browser-logs": "^0.4.0",
|
||||||
|
@ -80,7 +80,7 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "20.0.0",
|
"@types/node": "20.0.0",
|
||||||
"@types/parse5": "^7.0.0",
|
"@types/parse5": "^7.0.0",
|
||||||
"@web/test-runner": "^0.20.1",
|
"@web/test-runner": "^0.20.2",
|
||||||
"@web/test-runner-playwright": "^0.11.0",
|
"@web/test-runner-playwright": "^0.11.0",
|
||||||
"chai": "^4.5.0",
|
"chai": "^4.5.0",
|
||||||
"chai-dom": "^1.12.1",
|
"chai-dom": "^1.12.1",
|
||||||
|
@ -1,16 +1,8 @@
|
|||||||
import {
|
import {
|
||||||
summaryReporter,
|
summaryReporter,
|
||||||
defaultReporter,
|
defaultReporter
|
||||||
dotReporter
|
|
||||||
} from '@web/test-runner'
|
} from '@web/test-runner'
|
||||||
|
|
||||||
// There is a bug in the summaryReporter made with this PR https://github.com/modernweb-dev/web/pull/2126
|
|
||||||
// It captures the buffered logger into cachedLogger for reuse later for the test run finished error reporting
|
|
||||||
// But the buffered logger in finished its buffer flush before this test error reporting so these logs go nowhere
|
|
||||||
// to resolve this for now reusing dotReporter which reports errors well but disabled its . test reporting
|
|
||||||
const errorReporter = dotReporter()
|
|
||||||
delete errorReporter.reportTestFileResults
|
|
||||||
|
|
||||||
const config = {
|
const config = {
|
||||||
testRunnerHtml: (testFramework) => `
|
testRunnerHtml: (testFramework) => `
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
@ -69,7 +61,7 @@ const config = {
|
|||||||
'test/attributes/**/*.js',
|
'test/attributes/**/*.js',
|
||||||
'test/core/**/*.js'
|
'test/core/**/*.js'
|
||||||
],
|
],
|
||||||
reporters: [summaryReporter({ flatten: false }), errorReporter, defaultReporter({ reportTestProgress: true, reportTestResults: false })]
|
reporters: [summaryReporter({ flatten: false, reportTestLogs: false, reportTestErrors: true }), defaultReporter({ reportTestProgress: true, reportTestResults: true })]
|
||||||
}
|
}
|
||||||
|
|
||||||
export default config
|
export default config
|
||||||
|
Loading…
x
Reference in New Issue
Block a user