Add a warning when trying to replace and already replaced function
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 25/100
- Issue 类型
- 功能
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- javascript
- 领域
- testing
调研方向
The issue names no files, tests, or specific entry points. Start by locating the function-replacement API and the td.reset() cleanup path, then clarify whether repeated replacement should warn, prevent the operation, or restore the original double. Done criteria should cover the second replacement and cleanup between tests.
由索引模型根据 Issue 内容生成。
描述
We just ran into a strange issue where our tests accidentally replaced the same function twice where the second replace then replaced the testdouble function with yet another one. The td.reset() that is then run after each test only undid the second replace which left us still with with a replaced testdouble function for the next test.
I think it would be great if testdouble could help prevent/fix this situation somehow as - to us - it was very non-obvious what was going on and took some time to debug.
- 主要语言
- JavaScript
- 星标
- 1.4k
- 派生
- 141
- 平均合并
- 20 分钟
- 30 天内合并 PR
- 9
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
testdouble/testdouble.js 的其他 Issue
-
Feature request: `td.func().reset()` (reset spy/stub state)可能已有人在做 @MatrixNeoKozak 于 9 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 45/100
testdouble/testdouble.js#529 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 35/100
testdouble/testdouble.js#296 ·
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 25/100
testdouble/testdouble.js#276 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 35/100
testdouble/testdouble.js#275 · 3 条评论 ·
维护者通常 1 天内回复
-
enhancement
难度 3/5 1-2 天 新手友好度 45/100
testdouble/testdouble.js#269 ·
维护者通常 1 天内回复
查看 testdouble/testdouble.js 的全部 Issue
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 83/100
awesome-dsh-plugin/awesome-dsh-plugin#8715 ·
维护者通常 1 天内回复
-
[BUG]: Document embedding fails with "Cannot have chunkOverlap >= chunkSize" after switching to an embedder with a smaller max chunk length可能已有人在做 @RaphaelFakhri 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
Mintplex-Labs/anything-llm#6810 ·
维护者通常 1 天内回复
-
needs-triage Technical TODO
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
AOSSIE-Org/BabyNest#268 ·
维护者通常 1 天内回复
-
bug needs-triage
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复