Reproduce early cache eviction with unit test - #908
Conversation
|
More templates
@tanstack/angular-db
@tanstack/db
@tanstack/db-ivm
@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: |
|
Size Change: 0 B Total Size: 86.5 kB ℹ️ View Unchanged
|
|
Size Change: 0 B Total Size: 3.34 kB ℹ️ View Unchanged
|
samwillis
left a comment
There was a problem hiding this comment.
Looks good, thanks for this.
Nit: we should probably use the Vitest timer mocks, I've started using them where possible: https://vitest.dev/guide/mocking/timers
This PR introduces a unit test that reproduces the bug we had before with early cache eviction which is now fixed thanks to #870. Still, i think it's good to have this simple reproduction.