Skip to content

22.0.5 - passed folders to jest on CLI are not picked up #5272

@joscha

Description

@joscha

Do you want to request a feature or report a bug?

bug

What is the current behavior?

A CLI run which worked before (22.0.4):

jest --coverage "--collectCoverageFrom=src/**/*" "--collectCoverageFrom=!src/pages/**/*" "--collectCoverageFrom=!src/ui/**/*" "conf" "tools" "src/base" "src/features" "src/routes" "src/services" "src/pages/export/" "src/pages/renderer/"

running tests from conf, tools, src/base, ...

now fails in 22.0.5:

jest --coverage "--collectCoverageFrom=src/**/*" "--collectCoverageFrom=!src/pages/**/*" "--collectCoverageFrom=!src/ui/**/*" "conf" "tools" "src/base" "src/features" "src/routes" "src/services" "src/pages/export/" "src/pages/renderer/"
--
  | FAIL  ./conf
  | ● Test suite failed to run
  |  
  | EISDIR: illegal operation on a directory, read
  |  
  | at Object.readSync (node_modules/graceful-fs/polyfills.js:138:28)
  |  
  | FAIL  ./tools
  | ● Test suite failed to run
  |  
  | EISDIR: illegal operation on a directory, read
  |  
  | at Object.readSync (node_modules/graceful-fs/polyfills.js:138:28)
  |  
  | FAIL  src/base
  | ● Test suite failed to run
  |  
  | EISDIR: illegal operation on a directory, read
  |  
  | at Object.readSync (node_modules/graceful-fs/polyfills.js:138:28)
  |  
  | FAIL  src/features
  | ● Test suite failed to run
  |  
  | EISDIR: illegal operation on a directory, read
  |  
  | at Object.readSync (node_modules/graceful-fs/polyfills.js:138:28)
  |  
  | FAIL  src/routes
  | ● Test suite failed to run
  |  
  | EISDIR: illegal operation on a directory, read
  |  
  | at Object.readSync (node_modules/graceful-fs/polyfills.js:138:28)
  |  
  | FAIL  src/services
  | ● Test suite failed to run
  |  
  | EISDIR: illegal operation on a directory, read
  |  
  | at Object.readSync (node_modules/graceful-fs/polyfills.js:138:28)
  |  
  | FAIL  src/pages/export
  | ● Test suite failed to run
  |  
  | EISDIR: illegal operation on a directory, read
  |  
  | at Object.readSync (node_modules/graceful-fs/polyfills.js:138:28)
  |  
  | FAIL  src/pages/renderer
  | ● Test suite failed to run
  |  
  | EISDIR: illegal operation on a directory, read
  |  
  | at Object.readSync (node_modules/graceful-fs/polyfills.js:138:28)

If the current behavior is a bug, please provide the steps to reproduce and
either a repl.it demo through https://repl.it/languages/jest or a minimal
repository on GitHub that we can yarn install and yarn test.

repl.it is at 20.0.4 and won't have the same problem.

Repository is here: https://github.com/joscha/jest-2205-folders

What is the expected behavior?

The tests are run.

Please provide your exact Jest configuration and mention your Jest, node,
yarn/npm version and operating system.

node v8.9.4
jest 22.0.5
yarn 0.27.5
OSX Sierra but also fails on CI which is a Linux

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions