Skip to content

Commit f9c0a5c

Browse files
committed
fix: move the browserEnabled check to be per proj, to avoid setupFile polution
1 parent 4b2eb7d commit f9c0a5c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/worker/src/reporter.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -151,11 +151,11 @@ export class VSCodeReporter implements Reporter {
151151
//
152152
// Note: This is too late to enable the inspector itself, but we can still add setup files
153153
//
154-
const isBrowserEnabled = vitest.projects.some(project => project.config.browser?.enabled)
155-
156-
if (isBrowserEnabled && this.debug !== undefined && typeof this.debug === 'object') {
154+
if (this.debug !== undefined && typeof this.debug === 'object') {
157155
vitest.projects.forEach((project) => {
158-
project.config.setupFiles.push(this.setupFilePaths.browserDebug)
156+
if (project.config.browser?.enabled) {
157+
project.config.setupFiles.push(this.setupFilePaths.browserDebug)
158+
}
159159
})
160160
}
161161
}

0 commit comments

Comments
 (0)