Files
tasknote/client/src/__test__/App.test.tsx
T
rmcamposandGitHub d9c3dfe3c2 feat: automate prod and add filter options, and date picker (#355)
* feat: automate prod deployments

issue #338

* fix: string parse

* feat: add date picker and filter options

issue #127

* feat: add tooltip and date picker

* ci: split stage deploy into separate tasks to allow separate releases

* test: add more test cases

* ci: split workflows into client and server

* ci: fix pr server workflow
2025-03-14 19:27:21 -03:00

29 lines
793 B
TypeScript

import React from 'react';
import { test, vi } from 'vitest';
import App from '../App';
import { act, render } from '@testing-library/react';
import AuthContext from '../context/AuthContext';
import authContextMock from './__mocks__/authContextMock';
import SidebarContext from '../context/SidebarContext';
const sidebarContextMock = {
currentPage: '/home',
setNewPage: vi.fn()
};
vi.mock('react-charts', () => ({
Chart: ({ options }) => <div data-testid="mocked-chart">Mocked Chart</div>
}));
test('Renders the app', async () => {
await act(async () => {
render(
<AuthContext.Provider value={authContextMock}>
<SidebarContext.Provider value={sidebarContextMock}>
<App />
</SidebarContext.Provider>
</AuthContext.Provider>
);
});
});