René's URL Explorer Experiment


Title: chore(tests): ratchet real wall-clock waits in unit tests by waleedlatif1 · Pull Request #8954 · simstudioai/sim · GitHub

Open Graph Title: chore(tests): ratchet real wall-clock waits in unit tests by waleedlatif1 · Pull Request #8954 · simstudioai/sim

X Title: chore(tests): ratchet real wall-clock waits in unit tests by waleedlatif1 · Pull Request #8954 · simstudioai/sim

Description: Summary sleep( in tests went from 138 to 220 in 30 days, even though sim-testing.md already says "No real timers". use-chat.dom.test.tsx alone waits about 17s for real. This change makes that rule enforced instead of advisory, using the same approach as eslint-plugin-playwright's no-wait-for-timeout. New real-wait rule in check:test-patterns, applied to *.test.ts(x) only: Flagged sleep and interruptibleSleep, resolved through their @sim/utils/helpers import (aliases included) setTimeout from node:timers/promises a new Promise resolved by setTimeout Not flagged zero or missing delays reject-only timers files that mock @sim/utils/helpers *.integration.ts and *.live.test.ts, which wait on real services Fake timers: a wait passes when an earlier vi.useFakeTimers() fakes setTimeout for it, either in the same function or module, or in a beforeEach/beforeAll of an enclosing describe. toFake: ['Date'] and shouldAdvanceTime: true don't count. Each wait is its own numbered baseline entry, so adding a wait to an already-baselined file still fails. Initial baseline: 121 existing waits across 46 files. The baseline normally only shrinks, so it gets a one-time --update --init-rule , which admits entries only for a known rule the baseline doesn't track yet. It refuses unknown rules and rules already tracked. No other rule's entries change. Tests: 28 table-driven fixture tests in check-test-patterns.test.ts. Each of the 16 guards was reverted in turn and turned at least one test red. Test plan check:audits (check:test-patterns with 193 baselined entries) Script tests (check-test-patterns.test.ts)

Open Graph Description: Summary sleep( in tests went from 138 to 220 in 30 days, even though sim-testing.md already says "No real timers". use-chat.dom.test.tsx alone waits about 17s for real. This change makes ...

X Description: Summary sleep( in tests went from 138 to 220 in 30 days, even though sim-testing.md already says "No real timers". use-chat.dom.test.tsx alone waits about 17s for real. This chang...

Opengraph URL: https://github.com/simstudioai/sim/pull/8954

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:fe9df48e-55ac-534f-a58a-c0c7a285336f
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idE43A:73CE1:AC9C43:ECC51C:6AFB5016
html-safe-nonce7197dda980e1d9abbf490abb03c32d5d449ff2192a780766ecd6f7047d537671
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNDNBOjczQ0UxOkFDOUM0MzpFQ0M1MUM6NkFGQjUwMTYiLCJ2aXNpdG9yX2lkIjoiMjg2NTQxMDA5Nzg2MzY3NTkyNiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac00faa5b3363683186d339e1a28de23a2fc55ad907600ef212a8ac43ed19587a4
hovercard-subject-tagpull_request:4837734690
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/simstudioai/sim/pull/8954/files
twitter:imagehttps://avatars.githubusercontent.com/u/40672544?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/40672544?s=400&v=4
og:image:altSummary sleep( in tests went from 138 to 220 in 30 days, even though sim-testing.md already says "No real timers". use-chat.dom.test.tsx alone waits about 17s for real. This change makes ...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None7122bb414b542dba14d71a3f0b9f6fd2abce715b9f5912d082800563e6c806d1
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/simstudioai/sim git https://github.com/simstudioai/sim.git
octolytics-dimension-user_id199344406
octolytics-dimension-user_loginsimstudioai
octolytics-dimension-repository_id912559512
octolytics-dimension-repository_nwosimstudioai/sim
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id912559512
octolytics-dimension-repository_network_root_nwosimstudioai/sim
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasecbf66c024bb6d10e6955baa7413c54cf13a201bb
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/simstudioai/sim/pull/8954/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F8954%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F8954%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=simstudioai%2Fsim
Reloadhttps://github.com/simstudioai/sim/pull/8954/files
Reloadhttps://github.com/simstudioai/sim/pull/8954/files
Reloadhttps://github.com/simstudioai/sim/pull/8954/files
simstudioaihttps://github.com/simstudioai
simhttps://github.com/simstudioai/sim
Codehttps://github.com/simstudioai/sim
Issues129 (129)https://github.com/simstudioai/sim/issues
Pull requests197 (197)https://github.com/simstudioai/sim/pulls
Actionshttps://github.com/simstudioai/sim/actions
Projectshttps://github.com/simstudioai/sim/projects
Security and qualityhttps://github.com/simstudioai/sim/security
Insightshttps://github.com/simstudioai/sim/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fsimstudioai%2Fsim%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fsimstudioai%2Fsim%2Fissues%2Fnew%2Fchoose
waleedlatif1https://github.com/waleedlatif1
staginghttps://github.com/simstudioai/sim/tree/staging
chore/test-sleep-ratchethttps://github.com/simstudioai/sim/tree/chore/test-sleep-ratchet
Conversation 72 https://github.com/simstudioai/sim/pull/8954
Commits 9 https://github.com/simstudioai/sim/pull/8954/commits
Checks 49 https://github.com/simstudioai/sim/pull/8954/checks
Files changed https://github.com/simstudioai/sim/pull/8954/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/8954/files
chore(tests): ratchet real wall-clock waits in unit tests https://github.com/simstudioai/sim/pull/8954/files#top
Show all changes 9 commits https://github.com/simstudioai/sim/pull/8954/files
0d30805 chore(tests): ratchet real wall-clock waits in unit tests (check:test… waleedlatif1 Oct 13, 2026 https://github.com/simstudioai/sim/pull/8954/commits/0d30805211f7fc46f3005c72c0709564921578d4
819e62d fix(tests): keep a real-wait flagged before the fake-timer install in… waleedlatif1 Oct 13, 2026 https://github.com/simstudioai/sim/pull/8954/commits/819e62dec25775e50803679147baccbb43d45061
34f4448 Merge remote-tracking branch 'origin/staging' into chore/test-sleep-r… waleedlatif1 Oct 13, 2026 https://github.com/simstudioai/sim/pull/8954/commits/34f4448f866543f8ffaf3bad57e5962ef200400a
645d0f0 fix(tests): make real-wait's fake-timer exemption exact and drop --in… waleedlatif1 Oct 13, 2026 https://github.com/simstudioai/sim/pull/8954/commits/645d0f07d3c08e3a632528d1511d993a2573d657
7eb3e88 chore(tests): make the wait-export table read-only waleedlatif1 Oct 13, 2026 https://github.com/simstudioai/sim/pull/8954/commits/7eb3e88e6912e967bd062e63cfecdbe6a27103c3
33d9ca3 fix(tests): let a module-scope fake-timer install cover helper functi… waleedlatif1 Oct 13, 2026 https://github.com/simstudioai/sim/pull/8954/commits/33d9ca3593100b348a043bd58a9c2bd1a1be8620
c1d5c61 fix(tests): exempt helpers from a module-scope fake-timer install onl… waleedlatif1 Oct 13, 2026 https://github.com/simstudioai/sim/pull/8954/commits/c1d5c6174c9adbc3f2266fdc95c4bf42399291aa
b42f77b fix(tests): skip only helpers called before a module-scope fake-timer… waleedlatif1 Oct 13, 2026 https://github.com/simstudioai/sim/pull/8954/commits/b42f77be6f012f3a9a8b034e1c82548cc39ee670
9e04746 fix(tests): recognize module-scope helpers whose initializer is wrapp… waleedlatif1 Oct 13, 2026 https://github.com/simstudioai/sim/pull/8954/commits/9e04746821dec9427b55acf3d7c4f285a2b4d193
Clear filters https://github.com/simstudioai/sim/pull/8954/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/8954/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/8954/files
sim-testing.md https://github.com/simstudioai/sim/pull/8954/files#diff-f43816f1d2fbe0fc420225f0c16c8e7e5ae5ca4d7d47adc610dd79422c605474
sim-testing.mdc https://github.com/simstudioai/sim/pull/8954/files#diff-563e73d83c684f35648db98b05aadefab6f3988e7c7494f28a31d8a4b871095e
check-test-patterns.test.ts https://github.com/simstudioai/sim/pull/8954/files#diff-fb21f5f063836eea0cca488f5220f82812e2c459f21075e9a2832590c1267322
check-test-patterns.ts https://github.com/simstudioai/sim/pull/8954/files#diff-2d4fbb60ca126c040a72a78e9dee1b88cf442de30dae79b2a04217fcbae55458
test-patterns-baseline.json https://github.com/simstudioai/sim/pull/8954/files#diff-e9396af0cc8fc77db442859c5343172392727db1f3928531d504bc2f0321efc9
.claude/rules/sim-testing.mdhttps://github.com/simstudioai/sim/pull/8954/files#diff-f43816f1d2fbe0fc420225f0c16c8e7e5ae5ca4d7d47adc610dd79422c605474
View file https://github.com/simstudioai/sim/blob/9e04746821dec9427b55acf3d7c4f285a2b4d193/.claude/rules/sim-testing.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/8954/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/8954/files#diff-f43816f1d2fbe0fc420225f0c16c8e7e5ae5ca4d7d47adc610dd79422c605474
https://github.com/simstudioai/sim/pull/8954/files#diff-f43816f1d2fbe0fc420225f0c16c8e7e5ae5ca4d7d47adc610dd79422c605474
.cursor/rules/sim-testing.mdchttps://github.com/simstudioai/sim/pull/8954/files#diff-563e73d83c684f35648db98b05aadefab6f3988e7c7494f28a31d8a4b871095e
View file https://github.com/simstudioai/sim/blob/9e04746821dec9427b55acf3d7c4f285a2b4d193/.cursor/rules/sim-testing.mdc
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/8954/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/8954/files#diff-563e73d83c684f35648db98b05aadefab6f3988e7c7494f28a31d8a4b871095e
https://github.com/simstudioai/sim/pull/8954/files#diff-563e73d83c684f35648db98b05aadefab6f3988e7c7494f28a31d8a4b871095e
scripts/check-test-patterns.test.tshttps://github.com/simstudioai/sim/pull/8954/files#diff-fb21f5f063836eea0cca488f5220f82812e2c459f21075e9a2832590c1267322
View file https://github.com/simstudioai/sim/blob/9e04746821dec9427b55acf3d7c4f285a2b4d193/scripts/check-test-patterns.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/8954/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/8954/files#diff-fb21f5f063836eea0cca488f5220f82812e2c459f21075e9a2832590c1267322
https://github.com/simstudioai/sim/pull/8954/files#diff-fb21f5f063836eea0cca488f5220f82812e2c459f21075e9a2832590c1267322
Please reload this pagehttps://github.com/simstudioai/sim/pull/8954/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/8954/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.