Skip to content

Warning: Could not find any test files matching pattern: #2895

@wzup

Description

@wzup

Why the plugin doesn't see files when files 100% exist in my test folder?
I want to run test for certain files only.
How do I do it with mocha?

My set up:

// test folder. Files are the same. Changed name for the sake of showing you an error
/test
    nock.js
    nock_test.js

// package.json
"scripts": { "test": "mocha" }

None of these work. All throw the same error:

$ npm test nock
$ npm test nock.js
$ npm test nock_test
$ npm test nock_test.js

Error:

Warning: Could not find any test files matching pattern: nock
Warning: Could not find any test files matching pattern: nock.js
Warning: Could not find any test files matching pattern: nock_test
Warning: Could not find any test files matching pattern: nock_test.js
No test files found
npm ERR! Test failed. See above for more details.

How it can be? No test files matching pattern? It is not even a pattern! It is exactly a file name.
How to run it?

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