Skip to content

--watch crashes mocha on startup #2535

Closed

Description

I'm getting error below when running mocha in watch mode. As you can see, the file it tries to find is not even js file. Apparently the file link which breaks the mocha is somehow broken. It shouldn't break the mocha though. Without --watch, mocha runs just fine. i'm running mocha version 3.1.2 with following command from package.json:
"test-rc": "mocha 'frontend/*/.spec.js' --watch"

The error is following:

Error: ENOENT: no such file or directory, stat '/Users/me/code/my-project/public/index-apitest.php'
at Error (native)
at fs.statSync (fs.js:987:18)
at /Users/me/code/my-project/node_modules/mocha/lib/utils.js:255:11
at Array.forEach (native)
at Object.exports.files (/Users/me/code/my-project/node_modules/mocha/lib/utils.js:253:6)
at /Users/me/code/my-project/node_modules/mocha/lib/utils.js:256:17
at Array.forEach (native)
at Object.exports.files (/Users/me/code/my-project/node_modules/mocha/lib/utils.js:253:6)
at Object. (/Users/me/code/my-project/node_modules/mocha/bin/_mocha:408:26)
at Module._compile (module.js:556:32)
at Object.Module._extensions..js (module.js:565:10)
at Module.load (module.js:473:32)
at tryModuleLoad (module.js:432:12)
at Function.Module._load (module.js:424:3)
at Module.runMain (module.js:590:10)
at run (bootstrap_node.js:394:7)
at startup (bootstrap_node.js:149:9)
at bootstrap_node.js:509:3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    type: buga defect, confirmed by a maintainer

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions