Adding include paths to CLI testrunner
- 主要语言
- JavaScript
- 星标
- 1.9k
- 派生
- 359
- PR 合并指标
- 30 天内没有已合并 PR
描述
I think it would be useful to have something like --include=PATH for the CLI testrunner. That way you can setup your testsuite without having to know about the actual location of the test suite in the directory structure. The call to the CLI testrunner then can take care of setting up the enviroment using --include. No need to repeat
```
require =("../lib/LibrarySubjectToBeTested");
```
but do
```
require('LibrarySubjectToBeTested");
```
and simply call
```
nodeunit --include=../lib/
```
I implemented a patch that would add this functionality to the testrunner. Have a look at it: 1db0b284d70829d4fe5f8a1fe20274562cdc5bd8
Please let me know what you think and if there's anything I missed. If you like it, feel free to pull it in.
贡献指南
这个仓库没有索引到贡献指南
调研方向
首先检查 commit 1db0b284d70829d4fe5f8a1fe20274562cdc5bd8 和 CLI testrunner 入口点。检查提议的 --include=PATH 选项如何设置模块查找环境,然后运行现有测试套件;当 nodeunit --include=../lib/ 可以在不使用相对路径的情况下 require LibrarySubjectToBeTested 时,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- javascript, node.js
- 领域
- cli, testing-qa
- Issue 类型
- 功能
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 30/100