How to export function from module without nodeunit testing it?
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 35/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- javascript
- 领域
- testing-qa
调研方向
首先阅读 nodeunit 在 nodeunit . 命令周围的测试发现和模块加载行为;issue 未指定任何源文件或测试。比较导出函数的处理方式与所需的相邻测试布局。完成的标准是,所有预期的测试仍然运行,且不会调用为复用而导出的辅助函数。
由索引模型根据 Issue 内容生成。
描述
I've got a few tests scattered throughout multiple files.
Currently I just run nodeunit ., nodeunit then tests them all successfully. Great!
But I want to export a function from one of my files so that another can call it. The problem is that when I run nodeunit . that function now gets called.
How can I run tests on all files? I'm used to python's nose library, which only tests functions that have test in the function name.
Do I need to move all tests into a seperate file to the functionality? I don't want to do that. I like putting tests adjacent to the code they're testing.
- 主要语言
- JavaScript
- 星标
- 1.9k
- 派生
- 359
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
caolan/nodeunit 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 25/100
-
难度 2/5 1-3 小时 新手友好度 42/100
-
难度 3/5 1-2 天 新手友好度 35/100
-
难度 5/5 一周以上 新手友好度 20/100
-
难度 5/5 一周以上 新手友好度 25/100
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 77/100
apache/rocketmq-dashboard#6610 ·
维护者通常 3 天内回复
-
ACK_WAITING HELP_WANTED UPDATE_CS
难度 2/5 1-3 小时 新手友好度 78/100
OWASP/CheatSheetSeries#2781 ·
维护者通常 1 天内回复
-
Hermes: /ponytail off never reaches the model, the ruleset stays active可能已有人在做 @szsunyuan 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
DietrichGebert/ponytail#1121 ·
维护者通常 3 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
integrations plugin
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复