apollographql / apollographql/fullstack-tutorial
Error object in Integration test is different compared to error in playground
- Ngôn ngữ chính
- TypeScript
- Star
- 1.2k
- Fork
- 808
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
I wanted to test the error scenario for my query/mutation but I’m unable to do so. I've reproduced the issue in this [PR here at this line](https://github.com/apollographql/fullstack-tutorial/pull/153/files#diff-e38243b449b86e768973cba723ec7c8fR103).
Basically the problem is that when one of our datasource methods triggers an error then the `errorFromResponse` method is called and then the error is returned and we see that error in our playground but when you try to test it and mock the error in your test the error you get from query/mutation method from `apollo-server-testing` are both different.
#153
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 từ trường hợp kiểm thử tích hợp trong PR #153, cụ thể là diff được liên kết tại dòng 103, và lần theo lỗi datasource qua errorFromResponse cùng các lệnh gọi query/mutation từ apollo-server-testing. So sánh kết quả đó với lỗi của playground và chạy kiểm thử tích hợp bị ảnh hưởng. Được xem là hoàn tất khi kiểm thử tái hiện được lỗi datasource với cùng dạng lỗi hoặc thông báo lỗi như playground.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- graphql, node.js, typescript
- Lĩnh vực
- api, testing
- Loại issue
- Lỗi
- Độ 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
- 35/100