ConceptPortal-public/rsconcept/frontend/tests/mocks/auth.ts
Ivan da9745125e
Some checks failed
Frontend CI / build (22.x) (push) Waiting to run
Backend CI / build (3.12) (push) Has been cancelled
T: Implement backend mocking for tests
2025-01-27 16:12:41 +03:00

10 lines
263 B
TypeScript

import { Page } from '@playwright/test';
import { BACKEND_URL } from '../constants';
export async function authAnonymous(page: Page) {
await page.route(`${BACKEND_URL}/users/api/auth`, async route => {
await route.fulfill({ json: { id: null } });
});
}