Skip to content

test(angular-query*): prefix 'it' descriptions with 'should' for consistency#10547

Merged
sukvvon merged 1 commit intomainfrom
test/angular-query-prefix-it-with-should
Apr 21, 2026
Merged

test(angular-query*): prefix 'it' descriptions with 'should' for consistency#10547
sukvvon merged 1 commit intomainfrom
test/angular-query-prefix-it-with-should

Conversation

@sukvvon
Copy link
Copy Markdown
Collaborator

@sukvvon sukvvon commented Apr 21, 2026

🎯 Changes

Prefixes it descriptions that didn't start with should in both angular-query-experimental and angular-query-persist-client tests, matching the BDD convention already followed by the vast majority of tests in this repo.

Examples

  • it('throws NG0203 with descriptive error...')it('should throw NG0203 with descriptive error...')
  • it('can be used outside injection context...')it('should be usable outside injection context...')
  • it('Returns number of fetching queries')it('should return the number of fetching queries')
  • it('reactive options should update mutation')it('should update mutation when reactive options change')
  • it('supports "in" operator')it('should support "in" operator')
  • it('allow optional initialData function')it('should allow optional initialData function')
  • it('restores cache from persister')it('should restore cache from persister')

Scope

Test descriptions where the subject is TData / data / error (type-level tests) already carry should mid-sentence (e.g. 'TData should always be defined when initialData is provided as an object'). Those are BDD-valid as-is and intentionally left untouched.

✅ Checklist

  • I have followed the steps in the Contributing guide.
  • I have tested this code locally with pnpm run test:pr.

🚀 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

Release Notes

  • Tests
    • Standardized test case descriptions across the test suite to use consistent "should" phrasing for improved readability and maintainability.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 21, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: e597bac3-80d5-42b1-bed4-086ad35ba63d

📥 Commits

Reviewing files that changed from the base of the PR and between b79bb92 and a044d0f.

📒 Files selected for processing (10)
  • packages/angular-query-experimental/src/__tests__/infinite-query-options.test-d.ts
  • packages/angular-query-experimental/src/__tests__/inject-infinite-query.test.ts
  • packages/angular-query-experimental/src/__tests__/inject-is-fetching.test.ts
  • packages/angular-query-experimental/src/__tests__/inject-is-mutating.test.ts
  • packages/angular-query-experimental/src/__tests__/inject-is-restoring.test.ts
  • packages/angular-query-experimental/src/__tests__/inject-mutation-state.test.ts
  • packages/angular-query-experimental/src/__tests__/inject-mutation.test.ts
  • packages/angular-query-experimental/src/__tests__/inject-query.test.ts
  • packages/angular-query-experimental/src/__tests__/signal-proxy.test.ts
  • packages/angular-query-persist-client/src/__tests__/with-persist-query-client.test.ts

📝 Walkthrough

Walkthrough

Test case descriptions across multiple Angular Query test suites were updated to use consistent "should ..." phrasing conventions. No test logic, assertions, or execution flow was modified—only the human-readable description strings passed to it(...) blocks were renamed for consistency.

Changes

Cohort / File(s) Summary
Angular Query Experimental Test Descriptions
packages/angular-query-experimental/src/__tests__/infinite-query-options.test-d.ts, inject-infinite-query.test.ts, inject-is-fetching.test.ts, inject-is-mutating.test.ts, inject-is-restoring.test.ts, inject-mutation-state.test.ts, inject-mutation.test.ts, inject-query.test.ts, signal-proxy.test.ts
Updated nine test case descriptions to use consistent "should ..." phrasing conventions. Changes include renaming tests from past tense or imperative forms (e.g., "throws", "can be used") to standardized "should ..." prefix format.
Angular Query Persist Client Test Description
packages/angular-query-persist-client/src/__tests__/with-persist-query-client.test.ts
Updated single test case description from "restores cache from persister" to "should restore cache from persister" for consistency.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 Hopping through tests with glee so bright,
"Should" this, "should" that—descriptions unite!
No logic bent, no bugs to fight,
Just naming conventions polished just right,
A tidy warren of tests, pristine and tight! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: prefixing test descriptions with 'should' for consistency in angular-query packages.
Description check ✅ Passed The description follows the template, includes detailed changes with examples, and confirms both checklist items are completed and release impact is correctly marked.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch test/angular-query-prefix-it-with-should

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

@nx-cloud
Copy link
Copy Markdown

nx-cloud Bot commented Apr 21, 2026

View your CI Pipeline Execution ↗ for commit a044d0f

Command Status Duration Result
nx affected --targets=test:sherif,test:knip,tes... ✅ Succeeded 2m 12s View ↗
nx run-many --target=build --exclude=examples/*... ✅ Succeeded <1s View ↗

☁️ Nx Cloud last updated this comment at 2026-04-21 16:57:32 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
Copy link
Copy Markdown

pkg-pr-new Bot commented Apr 21, 2026

More templates

@tanstack/angular-query-experimental

npm i https://pkg.pr.new/@tanstack/angular-query-experimental@10547

@tanstack/eslint-plugin-query

npm i https://pkg.pr.new/@tanstack/eslint-plugin-query@10547

@tanstack/preact-query

npm i https://pkg.pr.new/@tanstack/preact-query@10547

@tanstack/preact-query-devtools

npm i https://pkg.pr.new/@tanstack/preact-query-devtools@10547

@tanstack/preact-query-persist-client

npm i https://pkg.pr.new/@tanstack/preact-query-persist-client@10547

@tanstack/query-async-storage-persister

npm i https://pkg.pr.new/@tanstack/query-async-storage-persister@10547

@tanstack/query-broadcast-client-experimental

npm i https://pkg.pr.new/@tanstack/query-broadcast-client-experimental@10547

@tanstack/query-core

npm i https://pkg.pr.new/@tanstack/query-core@10547

@tanstack/query-devtools

npm i https://pkg.pr.new/@tanstack/query-devtools@10547

@tanstack/query-persist-client-core

npm i https://pkg.pr.new/@tanstack/query-persist-client-core@10547

@tanstack/query-sync-storage-persister

npm i https://pkg.pr.new/@tanstack/query-sync-storage-persister@10547

@tanstack/react-query

npm i https://pkg.pr.new/@tanstack/react-query@10547

@tanstack/react-query-devtools

npm i https://pkg.pr.new/@tanstack/react-query-devtools@10547

@tanstack/react-query-next-experimental

npm i https://pkg.pr.new/@tanstack/react-query-next-experimental@10547

@tanstack/react-query-persist-client

npm i https://pkg.pr.new/@tanstack/react-query-persist-client@10547

@tanstack/solid-query

npm i https://pkg.pr.new/@tanstack/solid-query@10547

@tanstack/solid-query-devtools

npm i https://pkg.pr.new/@tanstack/solid-query-devtools@10547

@tanstack/solid-query-persist-client

npm i https://pkg.pr.new/@tanstack/solid-query-persist-client@10547

@tanstack/svelte-query

npm i https://pkg.pr.new/@tanstack/svelte-query@10547

@tanstack/svelte-query-devtools

npm i https://pkg.pr.new/@tanstack/svelte-query-devtools@10547

@tanstack/svelte-query-persist-client

npm i https://pkg.pr.new/@tanstack/svelte-query-persist-client@10547

@tanstack/vue-query

npm i https://pkg.pr.new/@tanstack/vue-query@10547

@tanstack/vue-query-devtools

npm i https://pkg.pr.new/@tanstack/vue-query-devtools@10547

commit: a044d0f

@github-actions
Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size
react full 11.99 KB (0%)
react minimal 9.02 KB (0%)

@sukvvon sukvvon self-assigned this Apr 21, 2026
@sukvvon sukvvon merged commit fc8a6a9 into main Apr 21, 2026
10 checks passed
@sukvvon sukvvon deleted the test/angular-query-prefix-it-with-should branch April 21, 2026 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant