setUp and tearDown do not appear to work in the browser
還沒有人認領這個 Issue。
評估
- 難度
- 2/5
- 預估耗時
- 1-3 小時
- 新手友好度
- 38/100
- Issue 類型
- 缺陷
- 描述清晰度
- 描述清楚
- 活躍度
- 停滯
- 技術堆疊
- javascript, node.js
研究方向
從 examples/browser/test.html、examples/browser/suite1.js 和 nodeunit.js 的瀏覽器版本開始,然後將其對 wrapGroup 的處理與 lib/core.js 進行比較。在新增 setUp 和 tearDown 後重新整理 test.html,以確認這些 hook 會被視為 setup 和 teardown,而不是一般測試來處理;瀏覽器範例應能執行,且不會將它們回報為測試。
由索引模型根據 Issue 內容生成。
描述
Steps to reproduce:
- Go into the examples/browser folder
- Open test.html
- Everything works as expected
- Add setUp and tearDown functions to suite1.js
- Refresh the page to rerun the tests
Defect: the functions added in step 4 are run just like normal tests
This appears to be a defect in the copy of nodeunit.js in the examples/browser folder. The example's version of nodeunit.js has a function wrapGroup but this is never called; whereas the node-based nodeunit.js in lib/core.js does call this.
(Sorry that I don't understand the code base well enough at the moment to offer a patch.)
- 主要語言
- JavaScript
- 星號
- 1.9k
- 分支
- 359
- PR 合併指標
- 30 天內沒有已合併 PR
環境準備
這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
caolan/nodeunit 的其他 Issue
-
難度 4/5 3-5 天 新手友好度 25/100
-
難度 3/5 1-2 天 新手友好度 35/100
-
難度 2/5 1-3 小時 新手友好度 42/100
-
難度 3/5 1-2 天 新手友好度 35/100
-
難度 5/5 一週以上 新手友好度 20/100
相似的 Issue
-
ai-proposed
難度 2/5 1-3 小時 新手友好度 82/100
-
area: certificates help wanted priority: must type: docs
難度 2/5 1-3 小時 新手友好度 72/100
WNSolutions/digimenu-tn#35 ·
-
bug priority: low
難度 1/5 1 小時以內 新手友好度 88/100
sandialabs/sceptre-phenix#464 ·
維護者通常 6 天內回覆
-
難度 1/5 1 小時以內 新手友好度 66/100
hemilabs/token-list#124 ·
-
難度 2/5 1-3 小時 新手友好度 61/100
維護者通常 1 天內回覆