Skip to content

Commit

Permalink
Refactored: src/screens/UserPortal/Campaigns from Jest to Vitest
Browse files Browse the repository at this point in the history
  • Loading branch information
rafidoth committed Dec 12, 2024
1 parent c9b2ead commit e57155e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
9 changes: 4 additions & 5 deletions src/screens/UserPortal/Campaigns/Campaigns.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import i18nForTest from 'utils/i18nForTest';
import type { ApolloLink } from '@apollo/client';
import useLocalStorage from 'utils/useLocalstorage';
import Campaigns from './Campaigns';
import { vi, it, expect, describe } from 'vitest';
import {
EMPTY_MOCKS,
MOCKS,
Expand Down Expand Up @@ -128,16 +129,14 @@ describe('Testing User Campaigns Screen', () => {
vi.unmock('react-router-dom');
render(
<MockedProvider addTypename={false} link={link1}>
<MemoryRouter initialEntries={['/user/campaigns']}>
<MemoryRouter initialEntries={['/user/campaigns/']}>
<Provider store={store}>
<I18nextProvider i18n={i18nForTest}>
<Routes>
<Route path="/user/campaigns" element={<Campaigns />} />
<Route path="/user/campaigns/" element={<Campaigns />} />
<Route
path="/"
element={
<div data-testid="paramsError">Error : orgId not found</div>
}
element={<div data-testid="paramsError"></div>}
/>
</Routes>
</I18nextProvider>
Expand Down
7 changes: 1 addition & 6 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
{
"compilerOptions": {
"types": [
"vite/client",
"vite-plugin-svgr/client",
"node",
"vitest/globals"
],
"types": ["vite/client", "vite-plugin-svgr/client", "node"],
"baseUrl": "src",
"target": "es5",
"lib": ["dom", "dom.iterable", "esnext"],
Expand Down

0 comments on commit e57155e

Please sign in to comment.