Skip to content

Commit

Permalink
fix(jest): add externalHelpers:true for jest (#673)
Browse files Browse the repository at this point in the history
Helper functions will show up in jest test coverage as uncovered lines.
  • Loading branch information
stefee committed Jan 5, 2023
1 parent 639cae5 commit e353c1a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/core/index.ts
Expand Up @@ -35,6 +35,7 @@ function transformOption(path: string, options?: Options, jest = false): SwcOpti
filename: path,
jsc: {
target: opts.target ?? DEFAULT_ES_TARGET,
externalHelpers: jest ? true : false,
parser: {
syntax: 'typescript' as const,
tsx: typeof opts.jsx !== 'undefined' ? opts.jsx : path.endsWith('.tsx'),
Expand Down

0 comments on commit e353c1a

Please sign in to comment.