Skip to content

Commit

Permalink
fix(coverage): expensive regexp hangs v8 report generation
Browse files Browse the repository at this point in the history
  • Loading branch information
AriPerkkio committed Feb 22, 2024
1 parent 28ed3c7 commit 50a3392
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/coverage-v8/src/provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const WRAPPER_LENGTH = 185

// Note that this needs to match the line ending as well
const VITE_EXPORTS_LINE_PATTERN = /Object\.defineProperty\(__vite_ssr_exports__.*\n/g
const DECORATOR_METADATA_PATTERN = /_ts_metadata\("design:paramtypes"(\s|.)+?]\),/g
const DECORATOR_METADATA_PATTERN = /_ts_metadata\("design:paramtypes", \[[^]*?\]\),*/g
const DEFAULT_PROJECT = Symbol.for('default-project')

const debug = createDebug('vitest:coverage')
Expand Down

0 comments on commit 50a3392

Please sign in to comment.