(value: QueryValue)
| 68 | type Title = 'Mr' | 'Ms' | 'Mx'; |
| 69 | |
| 70 | const titlesDecoder = (value: QueryValue): Title[] | undefined => { |
| 71 | const decodedValue = decodeList(value); |
| 72 | |
| 73 | const validTitles = decodedValue.filter(v => { |
| 74 | return ['Mr', 'Ms', 'Mx'].includes(v); |
| 75 | }) as Title[]; |
| 76 | |
| 77 | return validTitles.length > 0 ? validTitles : undefined; |
| 78 | }; |
| 79 | |
| 80 | const {result} = renderHookWithProviders(useLocationQuery, { |
| 81 | initialProps: { |
nothing calls this directly
no test coverage detected