NativeScript / NativeScript/nativescript-cli
Feature Request: Provision to put test files in feature folder instead of tests folder
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ả
From @shripalsoni04 on September 30, 2016 15:2
It will be great if we can put our test files in the respective feature folder instead of putting all the test files in app/tests folder.
When we do development for web version of angular application, we put the test files in respective feature folders with .spec.ts suffix as per the angular style guide.
If we can do the same thing in angularNative app also, it will be very easy to get started and it will open a way for unit-test code sharing. As currently we have different structures for test files in nativescript and web version, we cannot share the unit-test files easily and we need to manually copy the unit-test files and change the import path of the module being tested in test file for any cross platform shared code.
I thought to run a script which copies all the .spec.ts file to tests folder from feature folders, but then it will add complexities like adding new/changed test files back to app/tests folder in watch mode.
Let me know if there is already some way and I am missing that.
Thanks.
Copied from original issue: NativeScript/nativescript-angular#482
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 bằng cách xác định cách CLI hiện phát hiện và xử lý các tệp kiểm thử trong app/tests, bao gồm cả hành vi ở chế độ watch. So sánh quy trình đó với các tệp .spec.ts được yêu cầu trong các thư mục tính năng và xác định hành vi mong đợi đối với các kiểm thử dùng chung; hoàn thành khi các kiểm thử cục bộ của tính năng được hỗ trợ mà không cần sao chép thủ cô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ệ
- angular, typescript
- Lĩnh vực
- cli, testing
- Loại issue
- Tính năng
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 25/100