setUp and tearDown do not appear to work in the browser
- Ngôn ngữ chính
- JavaScript
- Star
- 1.9k
- Fork
- 359
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
Steps to reproduce:
1. Go into the examples/browser folder
2. Open test.html
3. Everything works as expected
4. Add setUp and tearDown functions to suite1.js
5. 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.)
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Hướng nghiên cứu
Bắt đầu với examples/browser/test.html, examples/browser/suite1.js và bản sao dành cho trình duyệt của nodeunit.js, sau đó so sánh cách xử lý wrapGroup của nó với lib/core.js. Cập nhật test.html sau khi thêm setUp và tearDown để xác nhận rằng các hook được xử lý như setup và teardown thay vì như các test thông thường; ví dụ trình duyệt phải chạy mà không báo cáo chúng là các test.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- javascript, node.js
- Lĩnh vực
- frontend, testing
- Loại issue
- Lỗi
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức phù hợp với người mới
- 38/100