Skip to content

Feature request: better error reporting when mocha can't find tests (getting started) #2194

Closed

Description

The getting started tutorial on the home page looks pretty simple, but if you put the test in a different directory than "test" it's suddenly not very friendly:

/usr/local/lib/node_modules/mocha/lib/utils.js:628
throw new Error("cannot resolve path (or pattern) '" + path + "'");
^

Error: cannot resolve path (or pattern) 'test'
at Object.lookupFiles (/usr/local/lib/node_modules/mocha/lib/utils.js:628:15)
at /usr/local/lib/node_modules/mocha/bin/_mocha:326:30
at Array.forEach (native)
at Object. (/usr/local/lib/node_modules/mocha/bin/_mocha:325:6)
at Module._compile (module.js:413:34)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at Function.Module.runMain (module.js:447:10)
at startup (node.js:142:18)
at node.js:939: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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions