ci: stabilize pipeline
All checks were successful
CI / Backend Tests (push) Successful in 31s
CI / Frontend Tests (push) Successful in 1m43s
CI / Build Docker Images (push) Successful in 4m45s

This commit is contained in:
2025-10-16 21:00:39 -05:00
parent 96dc42f0eb
commit a553b14017
12 changed files with 204 additions and 102 deletions

View File

@@ -1,7 +1,19 @@
import React from 'react';
import { render, screen } from '@testing-library/react';
import ReactDOMServer from 'react-dom/server';
import App from './App';
jest.mock('axios', () => ({
__esModule: true,
default: {
get: jest.fn(() => Promise.resolve({ data: {} })),
interceptors: {
request: { use: jest.fn() },
response: { use: jest.fn() }
}
},
get: jest.fn(() => Promise.resolve({ data: {} }))
}), { virtual: true });
// Mock the AuthContext
jest.mock('./contexts/AuthContext', () => ({
useAuth: () => ({
@@ -37,7 +49,7 @@ jest.mock('react-hot-toast', () => ({
describe('App', () => {
it('renders without crashing', () => {
render(<App />);
expect(screen.getByTestId('toaster')).toBeInTheDocument();
const markup = ReactDOMServer.renderToStaticMarkup(<App />);
expect(markup).toContain('data-testid="toaster"');
});
});