You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[P0] Stabilize the Vitest environment for pdfjs/react-pdf #8
Activity
rjiangDoFashion commentedon Oct 4, 2026
状态核查(2026-10-04):
vitest.config.ts明确使用environment: 'jsdom'并加载src/tests/setup.ts;setup 中有带注释的DOMMatrixmock,以及 jsdom 的URL.createObjectURL/revokeObjectURL兜底。测试文件还对react-pdf/pdfjs-dist做了边界 mock/隔离(例如PDFService、ThumbnailService与 Reader UI 测试)。.github/workflows/quality.yml在 Node 22 执行npm ci、npm run test:unit、npm run test:ui;main 当前提交fb8356d对应的 Product quality run #178(Actions run37185313360)中 checks 成功,日志显示 UI 为 19 个文件/370 tests 通过;同一 job 的 unit 步骤也成功。此前 PR Fix CJK thumbnail glyphs and long library filenames #47 的 run37172178676也成功完成 unit/UI 步骤。结论:实现、隔离策略和 CI 中 unit/UI 的成功运行已有直接证据,且与 Issue #8 的三项验收相符;但现有记录没有一条专门标注为 Issue #8 的验收运行或单独的 DOMMatrix 回归测试,故保留该 Issue open,待补充专门的 jsdom/DOMMatrix 验收证据后再关闭。