docs: add comprehensive testing guide for TanStack DB#1389
Open
KyleAMathews wants to merge 3 commits intomainfrom
Open
docs: add comprehensive testing guide for TanStack DB#1389KyleAMathews wants to merge 3 commits intomainfrom
KyleAMathews wants to merge 3 commits intomainfrom
Conversation
Adds a comprehensive testing docs page covering mock collection creation, framework-specific testing patterns (React, Vue, Svelte, Solid, Angular), mutation testing, and virtual prop handling. Also adds a db-core/testing skill for AI agent assistance with testing questions. https://claude.ai/code/session_01EsJdvoefdRVjyFXLazdn73
- Add `user-invocable: false` since this is background knowledge, not a command
- Expand description with trigger phrases ("when writing tests", "debugging test failures")
- Extract test inventory into references/test-inventory.md supporting file
(keeps SKILL.md focused, per "under 500 lines" guidance)
- Add cross-references from SKILL.md to the reference file
https://claude.ai/code/session_01EsJdvoefdRVjyFXLazdn73
More templates
@tanstack/angular-db
@tanstack/db
@tanstack/db-browser-wa-sqlite-persisted-collection
@tanstack/db-electron-sqlite-persisted-collection
@tanstack/db-ivm
@tanstack/db-node-sqlite-persisted-collection
@tanstack/db-react-native-sqlite-persisted-collection
@tanstack/db-sqlite-persisted-collection-core
@tanstack/electric-db-collection
@tanstack/offline-transactions
@tanstack/powersync-db-collection
@tanstack/query-db-collection
@tanstack/react-db
@tanstack/rxdb-db-collection
@tanstack/solid-db
@tanstack/svelte-db
@tanstack/trailbase-db-collection
@tanstack/vue-db
commit: |
Contributor
|
Size Change: 0 B Total Size: 110 kB ℹ️ View Unchanged
|
Contributor
|
Size Change: 0 B Total Size: 4.23 kB ℹ️ View Unchanged
|
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.
🎯 Changes
Added a comprehensive testing guide for TanStack DB that covers:
renderHookandwaitForfrom@testing-library/reactnextTick()with timing for reactivity updates$effect.rootandflushSync()from Svelte 5renderHookandwaitForfrom@solidjs/testing-libraryTestBed.runInInjectionContextfor injection contextcreateOptimisticActionAlso added a corresponding skill document (
db-core/testing/SKILL.md) that provides a quick reference guide with decision trees, access patterns for each framework, and a test suite overview.Updated
docs/config.jsonto include the new testing guide in the documentation navigation.✅ Checklist
🚀 Release Impact
https://claude.ai/code/session_01EsJdvoefdRVjyFXLazdn73