Skip to content

Commit

Permalink
fix: syncQueries should contain query, not find
Browse files Browse the repository at this point in the history
  • Loading branch information
phryneas committed Oct 11, 2024
1 parent 909fa61 commit 979e4c7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/renderStream/syncQueries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ export {Queries} from '@testing-library/dom'
type OriginalQueries = typeof queries

export type SyncQueries = {
[K in keyof OriginalQueries as K extends `${'query'}${string}`
[K in keyof OriginalQueries as K extends `${'find'}${string}`
? never
: K]: OriginalQueries[K]
}

export const syncQueries = Object.fromEntries(
Object.entries(queries).filter(
([key]) => key.startsWith('get') || key.startsWith('find'),
([key]) => key.startsWith('get') || key.startsWith('query'),
),
) as any as SyncQueries

Expand Down

0 comments on commit 979e4c7

Please sign in to comment.