node.js - Mocha only runs one test case
问题描述
I'm using mocha to test api's created using node.js. I've written two test file and the file structure is as follows
server/
├── connect/
| ├── test
| |── root.spec.ts
|
└── model/
├──test
├──abc.spec.ts
The script written in package.json is as follows.
"test": "mocha server/**/**/**.spec.ts --exit"
Now when I when I run the command npm test
in the terminal inside the model directory
. It shows content present inside the root.spec.ts
. How do I run the abc.spec.ts
i.e a single file.
解决方案
推荐阅读
- node.js - 在 CRA 反应应用程序中获取“在树的较高位置检测到不同版本的 webpack”错误
- javascript - Azure DevOps 扩展将一个字段的值复制到另一个字段
- reactjs - 出现错误:Expression expected.ts(1109) React js
- rust - 如何将字节转换为正确的十进制表示?
- github - 如何在 GitHub Desktop 中克隆需要 SSO 的存储库?
- sqlalchemy - sqlalchemy 一对一关系实例
- node.js - 有没有办法用 discord.js 检测不和谐的玩家 self_muted
- sql - 使用 oracle 并行化插入查询的问题
- android - Android Vector:为什么不采用描边颜色?
- javascript - 当使用 Date.now() 生成键时,我不确定如何访问和比较对象