This is my folder structure.
src/ a.js b.js test/ a.spec.js b.spec.js
and I tried to run
~/.../src $ mocha
~/.../src $ mocha test
~/.../src $ mocha test/
~/.../src $ mocha ./test/
~/.../src $ mocha ./test/*.js
but it doesn’t work ... all I get is just one test file, and the rest are ignored.
docs say that (1) should do the job, but it is not.
Well ... I'm an idiot. I had it.onlyone of my files, and I forgot about it. The answer "t21" was the answer. All test files are now running.
it.only
Sorry for that, shame on me ...
, , . mocha , --recursive
mocha
--recursive
.
, package.json -. npm install mocha --save-dev, package.json , npm test
npm install mocha --save-dev
package.json
npm test
{ "scripts": { "test": "./node_modules/.bin/mocha --recursive", } }
moch.opts
-
~/.../src $mocha; .
Source: https://habr.com/ru/post/1623220/More articles:Unable to start application using Parse - javaNode.js with a memory database and transactions - node.jsASP.NET MVC Identity - how to change the format of the generated token in SMS - asp.net-mvcWhat is this macro? - cIs python a thread or multiprocessor in the kernel of asynchronous calls? - pythonКак я могу перечислить все измененные файлы автором между диапазоном фиксации, но только с последней вещью, которая произошла с файлом в Git? - githttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1623222/ms-build-extension-pack-with-nuget-fails-to-get-msbuildextensionpacktasks&usg=ALkJrhiIUr35ozQnz989N6NsxEGUtkBBewSQL Server 2014 Management Studio will not remember custom color - sql-serverConvert HH: mm: ss in seconds - scalaHow to use environment variables in package.json - node.jsAll Articles