Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(vitest): show rollup error details as test error #6686

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
refactor: minor
  • Loading branch information
hi-ogawa committed Oct 11, 2024
commit 696bae91a1eac59e5d6ba2bec2dc901e44624889
6 changes: 3 additions & 3 deletions packages/vitest/src/node/pools/rpc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export function createMethodsRPC(project: WorkspaceProject, options: MethodsOpti
return r?.map as RawSourceMap | undefined
},
async fetch(id, transformMode) {
const result = await project.vitenode.fetchResult(id, transformMode).catch(e => handleRollupError(e))
const result = await project.vitenode.fetchResult(id, transformMode).catch(handleRollupError)
const code = result.code
if (!cacheFs || result.externalize) {
return result
Expand Down Expand Up @@ -66,10 +66,10 @@ export function createMethodsRPC(project: WorkspaceProject, options: MethodsOpti
return { id: tmp }
},
resolveId(id, importer, transformMode) {
return project.vitenode.resolveId(id, importer, transformMode).catch(e => handleRollupError(e))
return project.vitenode.resolveId(id, importer, transformMode).catch(handleRollupError)
},
transform(id, environment) {
return project.vitenode.transformModule(id, environment).catch(e => handleRollupError(e))
return project.vitenode.transformModule(id, environment).catch(handleRollupError)
},
onPathsCollected(paths) {
ctx.state.collectPaths(paths)
Expand Down