Skip to content

Commit a7768c8

Browse files
committed
Fix verbose output from unit test harness
1 parent a9bef5b commit a7768c8

3 files changed

Lines changed: 14 additions & 4 deletions

File tree

‎package-lock.json‎

Lines changed: 4 additions & 3 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 & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@
132132
"astro-link-validator": "github:rodgtr1/astro-link-validator",
133133
"astro-og-canvas": "^0.10.1",
134134
"astro-vtbot": "^2.1.11",
135+
"baseline-browser-mapping": "^2.9.19",
135136
"canvas-confetti": "^1.9.4",
136137
"confusing-browser-globals": "1.0.11",
137138
"cross-env": "^10.1.0",

‎vitest.config.ts‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,11 @@ const shouldSuppressEarlyVitestOutput = (value: string): boolean => {
2222
return (
2323
/\[astro-icon\]\s*Loaded icons/i.test(cleanValue) ||
2424
/Loaded icons from/i.test(cleanValue) ||
25-
/Local icons changed, reloading/i.test(cleanValue)
25+
/Local icons changed, reloading/i.test(cleanValue) ||
26+
// Vite SSR module runner teardown noise: the transport between the test
27+
// worker and Vite closes before astro:db / db/seed.ts finish evaluating.
28+
// Harmless — tests have already passed at this point.
29+
/transport was disconnected/i.test(cleanValue)
2630
)
2731
}
2832

@@ -70,6 +74,10 @@ export default getViteConfig({
7074
if (/\[astro-icon\] Loaded icons/i.test(message) || /Loaded icons from/i.test(message)) return
7175
viteLogger.info(message, options)
7276
},
77+
error: (message: string, options?: LogOptions) => {
78+
if (/transport was disconnected/i.test(message)) return
79+
viteLogger.error(message, options)
80+
},
7381
},
7482
define: {
7583
'import.meta.env.SITE': JSON.stringify(getSiteUrl()),

0 commit comments

Comments
 (0)