Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Tests: integration coverage for startHarper/teardownHarper against a real Harper

Đang mở
#11 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
52/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
typescript
Lĩnh vực
testing

Hướng nghiên cứu

Bắt đầu trong suite test/ và harness kiểm thử unit dựa trên fixture hiện có, sau đó xem xét startHarper, teardownHarper, killHarper và setupHarperWithFixture. Cấu hình pool harper-integration-test-setup-loopback và một peer dependency Harper thực, hoặc bỏ qua khi không có bản build Harper. Hoàn tất khi happy path, việc dọn dẹp teardown, việc khởi động lại mà không gặp EADDRINUSE và việc bao phủ các fixture được cài đặt sẵn đều chạy thành công.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

enhancement

Summary

Follow-up from #8 / #9. The new test/ suite covers runHarperCommand, killHarper, and the port helpers in isolation, but the lifecycle orchestration (startHarper / teardownHarper) is not exercised end-to-end because that needs a real Harper instance (the package's harper peer dependency) and loopback-pool setup. Worth adding as a separate integration-test layer.

Coverage to add

  • Happy path — startHarper(ctx) → make a request against ctx.harper.httpURL/operationsAPIURL → teardownHarper(ctx); assert the instance came up and was cleaned up.
  • Teardown orchestration — teardownHarper kills the process, waits for the fixed ports to free, releases the loopback address back to the pool, and removes the data root dir.
  • Race 2 restart path — killHarper(ctx) followed by startHarper(ctx) reusing the same hostname succeeds without EADDRINUSE (verifies the port-wait-before-spawn added in #9).
  • setupHarperWithFixture — a pre-installed component is available on first boot.

Notes

Needs a real Harper available (peer dependency) and the loopback pool configured (harper-integration-test-setup-loopback), so this likely lives in a separate harness from the fixture-based unit tests in test/. May be best run only where a Harper build is present (and skipped otherwise).


🤖 Generated with Claude Code

Ngôn ngữ chính
TypeScript
Star
1
Fork
0
Merge trung bình
15 ngày 3 giờ
Pull request đã merge (30 ngày)
3

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của HarperFast/integration-testing

Tất cả issue của HarperFast/integration-testing

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.