Skip to content

Update comment about default glob #3132

@boneskull

Description

@boneskull

From @ScottFreeCode on October 4, 2017 3:52

Here: https://mochajs.org/#the-test-directory

Currently says:

By default, mocha looks for the glob ./test/*.js and ./test/*.coffee, so you may want to put your tests in test/ folder.

This is inaccurate in one big way and one small way.

Big way: .coffee no longer used by default.

Small way: technically, the default glob is test; when a directory is specified Mocha looks in it for *.js files (or *.{js,<other extensions from --compilers}) or for **/*.js files when --recursive is specified. This is really only important if you need to understand adding *.{<extensions>} when replacing --compilers or if you need to understand --recursive, but we do occasionally get people confused about the interaction between globbing and --recursive...

Copied from original issue: mochajs/old-mochajs-site#82

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