oracle-gaps: refuse at baseline when more than one Vitest copy is loaded

Đang mở
#66 1 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

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

Đánh giá

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

Hướng nghiên cứu

Start with the baseline and harness code that runs the oracle file and the driver's use of vi.advanceTimersByTime and vi.useFakeTimers, and find where the resolved vitest path is available. The issue asks for a check comparing the vitest path from the harness, the framework, and the test file, which means the baseline must refuse with a fix line when they differ. Done means a test reproduces two loaded vitest copies and the run stops with the setup error instead of recording a law violation.

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

Mô tả

Reported from an adopter's first session, at c58b0c2. Not yet reproduced here.

Problem. pnpm installed [email protected] twice, once for each @types/node peer. The runner used one copy, while @tanstack/oracles and the oracle file shared the other. So useOracleClock's vi.useFakeTimers and the driver's vi.advanceTimersByTime ran on different copies, and the run failed with "A function to advance timers was called but the timers APIs are not mocked". The driver records thrown errors as observations, so the baseline reported the failure as a law violation (visible order, at checkpoint error). It took a replay to see that the setup was the cause.

Proposal. The baseline should refuse, with a fix line, when more than one vitest instance is loaded. One way to check: compare the resolved vitest path from the harness, from the framework, and from the test file. This is a harness failure, so it should stop the run and not be charged to a mutant (cleanup plan, Phase 2 A2).

This issue was written by Isaac.

Ngôn ngữ chính
JavaScript
Star
5
Fork
1
Merge trung bình
8 giờ 31 phút
Pull request đã merge (30 ngày)
60

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

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

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 TanStack/oracles

Tất cả issue của TanStack/oracles

Issue tương tự

Thêm issue về JavaScript

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.