mochaのエラー「The command line is too long.」

mochaのエラー「The command line is too long.」

mochaを実行すると「The command line is too long.」とエラーが出る場合があります。

これはmochaの引数の文字列長が8000文字くらい?以上超えると発生します。

回避方法は、gulp-mochaのバージョンを3.0.1に戻すとコマンドが通るようになります。

参考サイト

Timeout of 2000ms exceeded

「Timeout of 2000ms exceeded」とエラーが出たら--timeoutオプションで時間を延ばします。

package.jsonのnpm testで10秒にした例です。

"scripts": {
  "test": "set NODE_DEBUG=INRO&& nyc mocha --recursive --timeout 10000"
}

コメント

タイトルとURLをコピーしました