Skip to content

🚀 Feature: Change default value for --watch-ignore to **/node_modules, **/.git #5203

Open
@jedwards1211

Description

@jedwards1211

Feature Request Checklist

Overview

In monorepos and other projects that have node_modules and/or .git directories deeper than the root, mocha --watch watches the contents of these directories by default.

(You may say, but in a monorepo you're just running tests in the directory for each individual package, where its node_modules lives, right? But sometimes you want to run integration tests that combine multiple packages in the monorepo.)

This generally causes mocha --watch to take a long time to start up, with no clear indication why.

Suggested Solution

If we changed the default watch-ignore to ["**/node_modules", "**/.git"] it would automatically ignore all such directories

Alternatives

Of course we can override this in userland, but I think it would benefit everyone to just ignore all node_modules and .git directories by default.

Additional Info

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    semver-majorimplementation requires increase of "major" version number; "breaking changes"status: accepting prsMocha can use your help with this one!type: featureenhancement proposal

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions