test(lit-query): replace inline 'new Promise' timeouts with 'sleep' from 'query-test-utils' - #11104
test(lit-query): replace inline 'new Promise' timeouts with 'sleep' from 'query-test-utils'#11104sukvvon wants to merge 4 commits into
Conversation
…rom 'query-test-utils'
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughThe Lit Query package adds ChangesLit Query test timing utility adoption
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
| Command | Status | Duration | Result |
|---|---|---|---|
nx affected --targets=test:sherif,test:knip,tes... |
❌ Failed | 1m 39s | View ↗ |
nx run-many --target=build --exclude=examples/*... |
✅ Succeeded | <1s | View ↗ |
☁️ Nx Cloud last updated this comment at 2026-08-19 01:25:15 UTC
🚀 Changeset Version Preview9 package(s) bumped directly, 16 bumped as dependents. 🟨 Minor bumps
🟩 Patch bumps
|
size-limit report 📦
|
|
@sukvvon there’s something not quite right here, errors are persistent. do you want to get this over the finish line or should we close it? |

🎯 Changes
lit-query's tests were the only ones in the repo still writingnew Promise((resolve) => setTimeout(resolve, N))inline instead of using the sharedsleep(N)helper from@tanstack/query-test-utilsthat every other adapter package's tests already use. Added@tanstack/query-test-utilsas a devDependency and replaced all 14 occurrences acrossclient-switch-controllers.test.ts,counters-and-state.test.ts,mutation-controller.test.ts, andquery-controller.test.ts. No behavior change —sleepis implemented identically to the inlined promise.Left untouched: promises that resolve manually via a captured
resolvereference (e.g.resolveRefetch,resolveOld,resolveFetch), since those aren't fixed-delay timeouts.✅ Checklist
pnpm run test:pr.🚀 Release Impact
Summary by CodeRabbit