service-page test writes into the first test's deleted database

Đang mở Phù hợp với người mới
#201 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@cX3po đang làm issue này rồi.

Từ ngày 12/11/2026.

  • #317 của @cX3po — đang mở

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
68/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript
Lĩnh vực
testing-qa

Hướng nghiên cứu

Bắt đầu với reference-implementations/dacs-directory/test/service-page.test.ts, dòng 57-59 và 79-81, nơi mỗi test tạo thư mục dữ liệu riêng và đặt DACS_DIRECTORY_DATA; sau đó so sánh với carried-marker-signer.test.ts, dòng 14-16, nơi biến này được đặt trước lần import đầu tiên. Xác nhận lỗi bằng cách kiểm tra xem test thứ hai có ghi vào cơ sở dữ liệu mà t.after của test thứ nhất đã xóa hay không. Hoàn thành khi cả hai test dùng chung một thư mục được thiết lập trước lần import đầu tiên, thư mục đó được xóa trong một test.after duy nhất, mỗi test dùng listing id riêng biệt và bộ kiểm thử 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ả

contributors-section

Where: reference-implementations/dacs-directory/test/service-page.test.ts:81 (on phase0-completion at the linked commit)

What goes wrong: Both tests in test/service-page.test.ts create their own data folder and set DACS_DIRECTORY_DATA (lines 57-59 and 79-81), but the store module is imported dynamically in each. After the first test imports it, the module is cached and keeps the first test's folder open, which is deleted in that test's t.after. The second test therefore writes into a deleted database and still passes, so it is not isolated.

Suggested fix: Create one data folder at the top of the file and set DACS_DIRECTORY_DATA before the first import (as reference-implementations/dacs-directory/test/carried-marker-signer.test.ts:14-16 does), removing it in a single test.after. Give each test unique listing ids instead of a fresh folder.

Size: Small

This comes from a code review, not from a failing run, so please confirm it before starting. Send the fix as a pull request to phase0-completion. It merges once tests pass and a maintainer has approved it.

Ngôn ngữ chính
TypeScript
Star
0
Fork
3
Merge trung bình
20 giờ 26 phút
Pull request đã merge (30 ngày)
119

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 DACS-Agent-commerce/Community

Tất cả issue của DACS-Agent-commerce/Community

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.