Skip to content

To specify watching directories with mocha-cli #2702

@ShiMeiWo

Description

@ShiMeiWo

refs: #1780 (comment)

When we use --watch, mocha watches cwd(and all files under it). So, how about to specify watching directories and just watch them?

example)
If I want to run test/**/*.spec.js when src/directory/ and lib/directory/ have changed, type this:
mocha --watch src/directory:lib/directory test/**/*.spec.js

I'm glad if someone considers about this.
Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions