Mocha testing: _mocha: error: Unrecognized arguments

Currently facing a really weird issue during Mocha unit-testing.

npm command is:

cross-env NODE_ENV=testing nyc mocha test/**/*.js --timeout 8000 --exit

So unit-tests are being run inside docker-container. On ubuntu16.04-based image it worked great. But when I switched docker base image to node:carbon-alpine I'd faced this problem:

usage: _mocha [-h] [-c CONFIG]
_mocha: error: Unrecognized arguments: test/test1/test1.spec.js
    test/test1/test2.spec.js ...a lot of test files here...
    --timeout 8000 --exit.

Unfortunately, I couldn't find even any similar question related to this error.

First of all, that "usage" usage: _mocha [-h] [-c CONFIG] is really-really weird

I've run another command inside docker cross-env NODE_ENV=testing nyc mocha -h and it showed totally different usage Usage: mocha [debug] [options] [files]

Okay, so specifying search pattern isn't working, I can just try running
cross-env NODE_ENV=testing nyc mocha, and it should work because my directory that contains tests are called test and it should be parsed by default.

So it works good, no error, but 0 tests are found because inside test directory there are sub-folders with test files, works as expected. The solution is to add the flag --recursive

Running command cross-env NODE_ENV=testing nyc mocha --recursive again showed the issue of _mocha: error: Unrecognized arguments: --recursive.

Why can mocha not recognize built-in arguments and tests are not being found by path?