8000 "utils.files is not a function" (mocha: 5.0.2) · Issue #3265 · mochajs/mocha · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
"utils.files is not a function" (mocha: 5.0.2) #3265
Closed
@5c077yP

Description

@5c077yP

Description

Hey, i've just upgraded to the latest mocha version 5.0.2 and I now start to see a "utils.files is not a function" error when running in watch mode with passing a glob path. Seems this commit ec8901a removed the function which is still used in https://github.com/mochajs/mocha/blob/master/bin/_mocha#L532

Steps to Reproduce

NODE_ENV=test mocha './test/**/*.js'

Expected behavior:

it should execute my tests as before.

Actual behavior:

it crashes all the time

> NODE_ENV=test mocha './test/**/*.js' "--watch"

/opt/MY-PACKAGE/node_modules/mocha/bin/_mocha:532
  const watchFiles = utils.files(cwd, [ 'js' ].concat(program.watchExtensions));
                           ^

TypeError: utils.files is not a function
    at Object.<anonymous> (/opt/MY-PACKAGE/node_modules/mocha/bin/_mocha:532:28)
    at Module._compile (module.js:643:30)
    at Object.Module._extensions..js (module.js:654:10)
    at Module.load (module.js:556:32)
    at tryModuleLoad (module.js:499:12)
    at Function.Module._load (module.js:491:3)
    at Function.Module.runMain (module.js:684:10)
    at startup (bootstrap_node.js:187:16)
    at bootstrap_node.js:608:3

Versions

  • 5.0.2
  • shell: zsh
  • The code transpiler being used: babel

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0