NativeScript / NativeScript/nativescript-cli
[dev] Replace istanbul with nyc
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- JavaScript
- Star
- 1.1k
- Fork
- 204
- Merge trung bình
- 1 ngày 9 giờ
- Pull request đã merge (30 ngày)
- 8
Mô tả
As the istanbul package is not longer maintained, we need to migrate to nyc.
Currently istanbul doesn't work for the following code:
const { stdio = "inherit" } = options;
In this case grunt test command fails with an exception:
__cov_gCRxMpJElFAq6oDSOHYQNQ.s['1']++;var __awaiter=(__cov_gCRxMpJElFAq6oDSOHYQNQ.b['1'][0]++,this)&&(__cov_gCRxMpJElFAq6oDSOHYQNQ.b['1'][1]++,this.__awaiter)||(__cov_gCRxMpJElFAq6oDSOHYQNQ.b['1'][2]++,function(thisArg,_arguments,P,generator){__cov_gCRxMpJElFAq6oDSOHYQNQ.f['1']++;__cov_gCRxMpJElFAq6oDSOHYQNQ.s['2']++;return new((__cov_gCRxMpJElFAq6oDSOHYQNQ.b['2'][0]++,P)||(__cov_gCRxMpJElFAq6oDSOHYQNQ.b['2'][1]++,P=Promise))(function(resolve,reject){__cov_gCRxMpJElFAq6oDSOHYQNQ.f['2']++;function fulfilled(value){__cov_gCRxMpJElFAq6oDSOHYQNQ.f['3']++;__cov_gCRxMpJElFAq6oDSOHYQNQ.s['4']++;try{__cov_gCRxMpJElFAq6oDSOHYQNQ.s['5']++;step(generator.next(value));}catch(e){__cov_gCRxMpJElFAq6oDSOHYQNQ.s['6']++;reject(e);}}function rejected(value){__cov_gCRxMpJElFAq6oDSOHYQNQ.f['4']++;__cov_gCRxMpJElFAq6oDSOHYQNQ.s['8']++;try{__cov_gCRxMpJElFAq6oDSOHYQNQ.s['9']++;step(generator['throw'](value));}catch(e){__cov_gCRxMpJElFAq6oDSO
SyntaxError: Unexpected token :
at new Script (vm.js:79:7)
at createScript (vm.js:251:10)
at Object.runInThisContext (vm.js:303:10)
at Module._compile (internal/modules/cjs/loader.js:656:28)
at Object.Module._extensions.(anonymous function) [as .js] (/Users/havaluova/Work3/nativescript-cli/node_modules/istanbul/lib/hook.js:107:24)
at Module.load (internal/modules/cjs/loader.js:598:32)
at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
at Function.Module._load (internal/modules/cjs/loader.js:529:3)
at Module.require (internal/modules/cjs/loader.js:636:17)
at require (internal/modules/cjs/helpers.js:20:18)
It seems that when the above mentioned error occurs, istanbul exits with status code 0 and this is the reason why jenkins build doesn't fail in such situation.
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu với lệnh grunt test và tìm dependency Istanbul cùng cấu hình coverage được CLI sử dụng. Kiểm tra cách bản build Jenkins nhận các lỗi kiểm thử và xác minh quá trình migration bằng ví dụ destructuring hiện đang gây ra lỗi cú pháp. Hoàn tất khi các kiểm thử chạy với nyc và lỗi coverage tạo ra trạng thái khác không.
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
- Lĩnh vực
- cli, testing-qa
- Loại issue
- Tái cấu trúc
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 38/100