Skip to content

Commit

Permalink
#48 test wrappers
Browse files Browse the repository at this point in the history
  • Loading branch information
mwarman committed Jun 4, 2024
1 parent 07c0ac7 commit 49e131d
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/api/__tests__/useGetUserTokens.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { beforeEach, describe, expect, it, vi } from 'vitest';
import dayjs from 'dayjs';

import { renderHook, waitFor } from 'test/test-utils';
import WithQueryClientProvider from 'test/WithQueryClientProvider';
import WithQueryClientProvider from 'test/wrappers/WithQueryClientProvider';
import storage from 'utils/storage';
import { userTokensFixture } from '__fixtures__/tokens';

Expand Down
2 changes: 1 addition & 1 deletion src/test/test-utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
} from '@testing-library/react';

import 'utils/i18n';
import WithAllProviders from './WithAllProviders';
import WithAllProviders from './wrappers/WithAllProviders';

const customRender = (ui: React.ReactElement, options?: RenderOptions, { route = '/' } = {}) => {
window.history.pushState({}, 'Test page', route);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import SettingsContextProvider from 'providers/SettingsProvider';
import AuthContextProvider from 'providers/AuthProvider';
import ToastsProvider from 'providers/ToastsProvider';

import { queryClient } from './query-client';
import { queryClient } from '../query-client';

/**
* A React test wrapper. Wraps the component under test with a bespoke set
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import SettingsContextProvider from 'providers/SettingsProvider';
import AuthContextProvider from 'providers/AuthProvider';
import ToastsProvider from 'providers/ToastsProvider';

import { queryClient } from './query-client';
import { queryClient } from '../query-client';

/**
* The default React test wrapper. Wraps the component under test with a set
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { PropsWithChildren } from 'react';
import { MemoryRouter } from 'react-router-dom';
import { QueryClientProvider } from '@tanstack/react-query';

import { queryClient } from './query-client';
import { queryClient } from '../query-client';

/**
* A React test wrapper. Wraps the component under test with a bespoke set
Expand Down

0 comments on commit 49e131d

Please sign in to comment.