Skip to content

test(*): resolve 'require-await' warnings in test files - #295

Merged
sukvvon merged 1 commit into
mainfrom
chore/eslint-require-await
Oct 12, 2026
Merged

sukvvon merged 1 commit into
mainfrom
chore/eslint-require-await

Conversation

@sukvvon

@sukvvon sukvvon commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

🎯 Changes

Resolve all @typescript-eslint/require-await warnings in the tests directories of pacer, alpine-pacer, lit-pacer, svelte-pacer, and vue-pacer.

  • Replace async functions without await with functions that return a promise directly:
    • return value → return Promise.resolve(value)
    • throw error → return Promise.reject(error), so errors stay rejections instead of becoming synchronous throws
    • functions with no return value now return Promise.resolve(), so they still go through the async code path
  • The functions still return a Promise, so runtime behavior and the inferred types checked by expectTypeOf are unchanged.

✅ Checklist

  • I have followed the steps in the Contributing guide.
  • I have tested code changes locally with pnpm run test:pr, or these tests do not apply to this pull request.
  • I fully understand the code in this pull request, including any code generated with AI assistance.

🚀 Release Impact

  • This change affects published code, and I have generated a changeset.
  • This change is docs/CI/dev-only (no release).

Summary by CodeRabbit

  • Tests
    • Updated async utility test callbacks across framework packages to return promises explicitly. Existing test scenarios and assertions remain unchanged.

@sukvvon sukvvon self-assigned this Oct 12, 2026
@changeset-bot

changeset-bot Bot commented Oct 12, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 91723ea

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: TanStack/pacer/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 6f95f3de-d692-4a4d-819c-330bb0296c6d

📥 Commits

Reviewing files that changed from the base of the PR and between bb9d8c3 and 91723ea.


📒 Files selected for processing (30)
  • packages/alpine-pacer/tests/createAsyncBatcher.test.ts
  • packages/alpine-pacer/tests/createAsyncDebouncer.test.ts
  • packages/alpine-pacer/tests/createAsyncQueuer.test.ts
  • packages/alpine-pacer/tests/createAsyncRateLimiter.test.ts
  • packages/alpine-pacer/tests/createAsyncThrottler.test.ts
  • packages/alpine-pacer/tests/helpers.test.ts
  • packages/lit-pacer/tests/createAsyncBatcher.test.ts
  • packages/lit-pacer/tests/createAsyncDebouncer.test.ts
  • packages/lit-pacer/tests/createAsyncQueuer.test.ts
  • packages/lit-pacer/tests/createAsyncRateLimiter.test.ts
  • packages/lit-pacer/tests/createAsyncThrottler.test.ts
  • packages/lit-pacer/tests/helpers.test.ts
  • packages/pacer/tests/async-batcher.test.ts
  • packages/pacer/tests/async-debouncer.test.ts
  • packages/pacer/tests/async-queuer.test.ts
  • packages/pacer/tests/async-rate-limiter.test.ts
  • packages/pacer/tests/async-retryer.test.ts
  • packages/pacer/tests/async-throttler.test.ts
  • packages/svelte-pacer/tests/createAsyncBatcher.test.ts
  • packages/svelte-pacer/tests/createAsyncDebouncer.test.ts
  • packages/svelte-pacer/tests/createAsyncQueuer.test.ts
  • packages/svelte-pacer/tests/createAsyncRateLimiter.test.ts
  • packages/svelte-pacer/tests/createAsyncThrottler.test.ts
  • packages/svelte-pacer/tests/helpers.test.ts
  • packages/vue-pacer/tests/helpers.test.ts
  • packages/vue-pacer/tests/useAsyncBatcher.test.ts
  • packages/vue-pacer/tests/useAsyncDebouncer.test.ts
  • packages/vue-pacer/tests/useAsyncQueuer.test.ts
  • packages/vue-pacer/tests/useAsyncRateLimiter.test.ts
  • packages/vue-pacer/tests/useAsyncThrottler.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review.



📝 Walkthrough

Walkthrough

The changes replace async test callbacks with regular callbacks that return explicit resolved or rejected promises. The updated tests cover core async primitives and their Alpine, Lit, Svelte, and Vue adapters.

Changes

Async Test Callback Updates

Layer / File(s) Summary
Core async primitive tests
packages/pacer/tests/async-batcher.test.ts, packages/pacer/tests/async-debouncer.test.ts, packages/pacer/tests/async-rate-limiter.test.ts, packages/pacer/tests/async-retryer.test.ts, packages/pacer/tests/async-throttler.test.ts
Callbacks in these tests now return promises explicitly.
Async queuer tests
packages/pacer/tests/async-queuer.test.ts
Queuer callbacks and a batch function now return resolved or rejected promises explicitly.
Framework adapter tests
packages/{alpine,lit,svelte}-pacer/tests/createAsync*.test.ts, packages/{alpine,lit,svelte}-pacer/tests/helpers.test.ts, packages/vue-pacer/tests/*Async*.test.ts, packages/vue-pacer/tests/helpers.test.ts
Async adapter test callbacks now return resolved promises explicitly.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Suggested reviewers: kevinvandy


Merge Risk: ⚪ Minimal · up to 91723

The changes affect test callbacks, and no concrete regression is established; no PR-specific issue remains to resolve before merging.

Pre-merge checks | Passed 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: resolving require-await warnings in test files.
Description check Passed The description explains the changes and motivation, completes all required checklist items, reports testing, and identifies the change as dev-only with no release impact.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 3…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.

✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR

🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@nx-cloud

nx-cloud Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit 91723ea

Command Status Duration Result
nx run-many --targets=build --exclude=examples/** ✅ Succeeded 1s View ↗

☁️ Nx Cloud last updated this comment at 2026-10-12 13:04:12 UTC

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Changeset Version Preview

No changeset entries found. Merging this PR will not cause a version bump for any packages.

@pkg-pr-new

pkg-pr-new Bot commented Oct 12, 2026

Copy link
Copy Markdown
More templates

@tanstack/alpine-pacer

npm i https://pkg.pr.new/@tanstack/alpine-pacer@295

@tanstack/angular-pacer

npm i https://pkg.pr.new/@tanstack/angular-pacer@295

@tanstack/angular-pacer-devtools

npm i https://pkg.pr.new/@tanstack/angular-pacer-devtools@295

@tanstack/ember-pacer

npm i https://pkg.pr.new/@tanstack/ember-pacer@295

@tanstack/lit-pacer

npm i https://pkg.pr.new/@tanstack/lit-pacer@295

@tanstack/octane-pacer

npm i https://pkg.pr.new/@tanstack/octane-pacer@295

@tanstack/pacer

npm i https://pkg.pr.new/@tanstack/pacer@295

@tanstack/pacer-devtools

npm i https://pkg.pr.new/@tanstack/pacer-devtools@295

@tanstack/pacer-lite

npm i https://pkg.pr.new/@tanstack/pacer-lite@295

@tanstack/preact-pacer

npm i https://pkg.pr.new/@tanstack/preact-pacer@295

@tanstack/preact-pacer-devtools

npm i https://pkg.pr.new/@tanstack/preact-pacer-devtools@295

@tanstack/react-pacer

npm i https://pkg.pr.new/@tanstack/react-pacer@295

@tanstack/react-pacer-devtools

npm i https://pkg.pr.new/@tanstack/react-pacer-devtools@295

@tanstack/solid-pacer

npm i https://pkg.pr.new/@tanstack/solid-pacer@295

@tanstack/solid-pacer-devtools

npm i https://pkg.pr.new/@tanstack/solid-pacer-devtools@295

@tanstack/svelte-pacer

npm i https://pkg.pr.new/@tanstack/svelte-pacer@295

@tanstack/svelte-pacer-devtools

npm i https://pkg.pr.new/@tanstack/svelte-pacer-devtools@295

@tanstack/vue-pacer

npm i https://pkg.pr.new/@tanstack/vue-pacer@295

@tanstack/vue-pacer-devtools

npm i https://pkg.pr.new/@tanstack/vue-pacer-devtools@295

commit: 91723ea

@sukvvon
sukvvon merged commit e2691ba into main Oct 12, 2026
12 checks passed
@sukvvon
sukvvon deleted the chore/eslint-require-await branch October 12, 2026 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant