Skip to content

istanbul ignore next is ignored after upgrade @babel/core from 7.5.5 to 7.6.0 #10432

@mgrybyk

Description

@mgrybyk

Bug Report

Current Behavior
After upgrade @babel/core from 7.5.5 to 7.6.0 jest --coverage ignores /* istanbul ignore next */

Input Code

  1. clone https://github.com/webdriverio/webdriverio
  2. remove node_modules and package-lock.json
  3. set @babel/core version to 7.6.0
  4. npm install
  5. run node_modules/.bin/jest --clearCache ; node_modules/.bin/jest packages/wdio-sync

Actual Result:
executeHooksWithArgs in executeHooksWithArgs.js is NOT ignored which means that /* istanbul ignore next */ is ignored

NOTE:
if you repeat steps from 1 to 5 but set @babel/core version to 7.5.5 executeHooksWithArgs in executeHooksWithArgs.js will be ignored, which means the issue is regression since @babel/core version 7.5.5

Expected behavior/code
/* istanbul ignore next */ should be taken into account

Babel Configuration (.babelrc, package.json, cli command)

https://github.com/webdriverio/webdriverio/blob/master/babel.config.js

Environment

  • Babel version(s): @babel/core 7.6.0
  • Node/npm version: Node 10 / npm 6.9.0
  • OS: OSX 10.3.6 / Ubuntu Xenial
  • Monorepo: lerna

Possible Solution

Additional context/Screenshots
@babel/core 7.6.0
image

@babel/core 7.5.5
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Has PRi: regressionoutdatedA closed issue/PR that is archived due to age. Recommended to make a new issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions