节点JS摩卡testing用例没有运行

我正试图build立一个testing用例的testing套件。 由于某种原因,我们没有把我们的射击钩住,所以我使得testing用例尽可能简单。 除了前面描述的之外,还没有任何一个debug.log打印出来。 这几乎就像代码没有看到我的摩卡testing。 我有摩卡安装本地作为开发依赖。 即使我的代码中没有那么多的testing用例,它也会返回一些testing用例。 我已经尝试卸载并重新安装摩卡。

terminal返回** / test / runner.jsinputOrg Runnerconfiguration设置数据库信息:mongodb:// xxxxx:xxxxxxxx @ localhost / icpDB

657个testing。 0失败。 268毫秒

进程使用退出码0结束

const mocha = require('mocha'); const chai = require('chai'); const debug = require('debug'); debug.log('Entered Org Runner'); describe('Org api test suite', function () { before(function (done) { debug.log('Entered Org Before'); done(); }); after(function (done) { debug.log('Entered Org After'); done(); }); it('should create a new org', function (done) { debug.log('Entered Create Org It'); done(); }); describe('GET Orgs', function () { it('should respond with an array of orgs', function (done) { debug.log('Entered Get Orgs It'); done(); }); }); describe('GET Org', function () { it('should get a org by id', function (done) { debug.log('It: should get a org by id'); done(); }); it('should throw an error for invalid id', function (done) { debug.log('It: should throw an error for invalid id'); done(); }); }); describe('Update Org', function () { it('should update an existing org', function (done) { debug.log('should update an existing org'); done(); }); }); describe('Delete Org', function () { it('should delete an existing org', function (done) { debug.log('should delete an existing org'); done(); }); }); }); 

原来这个问题是在我的package.json中使用–recursive。 其中一个testing案例导致摩卡离开。 当我直接指向上面的特定文件时,它按预期执行。