Repository navigation
修复 workbench.test 时间炸弹:硬编码时间戳改相对时间 - #21
Merged
todosdev[bot] merged 1 commit intoNov 18, 2026
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
workbench.test.tsx中的硬编码时间戳改为基于运行时刻的相对时间生成函数。Changes
web/src/pages/workbench.test.tsx:futureIso(hours)与pastIso(hours)相对时间辅助函数。expiresAt设置为当前时间后 48 小时,确保剩余时间恒大于 24 小时,分享默认档位稳定断言为"24h"。createdAt与lastDownloadedAt替换为相对过去的时刻,全文件清除所有硬编码 ISO 时间戳。Testing
pnpm --filter ./web test src/pages/workbench.test.tsx:7 项测试全部通过。pnpm test:Worker(237 项)与 Web(156 项)共 393 项测试全量通过。pnpm lint/pnpm format:check/pnpm typecheck/pnpm build:全部校验通过。