Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run prettier #23752

Merged
merged 1 commit into from
Aug 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ describe('useQueryPersistedFilterState', () => {

it('should initialize with decoded state from query string', () => {
const {result} = renderHook(
() => useQueryPersistedFilterState<{filterA: string[]; filterB: string[]}>(['filterA', 'filterB']),
() =>
useQueryPersistedFilterState<{filterA: string[]; filterB: string[]}>([
'filterA',
'filterB',
]),
{
wrapper: wrapper({
initialEntries: [
Expand All @@ -41,7 +45,11 @@ describe('useQueryPersistedFilterState', () => {

it('should encode the state correctly when setting a value', () => {
const {result} = renderHook(
() => useQueryPersistedFilterState<{filterA: string[]; filterB: string[]}>(['filterA', 'filterB']),
() =>
useQueryPersistedFilterState<{filterA: string[]; filterB: string[]}>([
'filterA',
'filterB',
]),
{wrapper: wrapper()},
);

Expand All @@ -54,7 +62,11 @@ describe('useQueryPersistedFilterState', () => {

it('should create setters dynamically for each filter field', () => {
const {result} = renderHook(
() => useQueryPersistedFilterState<{filterA: string[]; filterB: string[]}>(['filterA', 'filterB']),
() =>
useQueryPersistedFilterState<{filterA: string[]; filterB: string[]}>([
'filterA',
'filterB',
]),
{wrapper: wrapper()},
);

Expand All @@ -73,10 +85,10 @@ describe('useQueryPersistedFilterState', () => {
it('should handle undefined or empty values correctly', () => {
const {result} = renderHook(
() =>
useQueryPersistedFilterState<{filterA: string[] | undefined; filterB: string[] | undefined}>([
'filterA',
'filterB',
]),
useQueryPersistedFilterState<{
filterA: string[] | undefined;
filterB: string[] | undefined;
}>(['filterA', 'filterB']),
{wrapper: wrapper()},
);

Expand Down