Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Remaining wall-clock dependent tests

未关闭
#265 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
56/100
Issue 类型
重构
描述清晰度
基本清楚
活跃度
活跃
技术栈
playwright, typescript
领域
testing

调研方向

Start with the listed tests in test/surfaces/vite-plugin.test.ts and read how they handle the production debounce; identify how the current test setup can drive time deterministically. Then review the waits in test/scripts/demo-integration-signals.test.ts and test/surfaces/overlay-client.test.ts for assertions that can use positive signals. Done means the listed load-sensitive waits are addressed while the gated integration assertions remain unchanged.

由索引模型根据 Issue 内容生成。

描述

bug

What

Three load-sensitive tests were made deterministic before the freeze. A sweep found others that depend on real elapsed time and were left in place:

  • test/surfaces/vite-plugin.test.ts around lines 837 to 853: three 20 ms pauses race a real 80 ms production debounce; a delayed sleep fires the debounce early and breaks the nothing-has-run assertions. The strongest remaining risk.
  • test/surfaces/vite-plugin.test.ts lines 561, 633, 781: 120 ms timers waiting out the same debounce with a 40 ms margin.
  • test/scripts/demo-integration-signals.test.ts lines 71 to 73: asserts under 1,000 ms around a real 50 ms bound.
  • test/surfaces/scrub.test.ts lines 468 to 474: under 8,000 ms over synchronous work.
  • test/deps/real.integration.test.ts lines 218 to 220 and test/deps/readiness.real.test.ts: gated behind the integration flag; the latter are load-safe by direction.
  • test/surfaces/overlay-client.test.ts: two waits that assert nothing happened (load only strengthens them), two 900 ms route delays staging stale-response races, and many expect.poll calls at the 1,000 ms default around real Chromium round trips.

Direction

Drive the debounce with a fake clock in the vite plugin tests. Convert the nothing-happened waits to a positive signal. Leave the gated integration assertions.

主要语言
TypeScript
星标
0
派生
0
平均合并
2 小时 48 分钟
30 天内合并 PR
8

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 有 Pull Request 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

usabl-dev/usabl 的其他 Issue

查看 usabl-dev/usabl 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。