style: align oxfmt to trailing-comma 'all' and normalize code
All checks were successful
Build and Push Docker Image / build (push) Successful in 28s
All checks were successful
Build and Push Docker Image / build (push) Successful in 28s
The repo was authored prettier-style (trailing-comma 'all') but .oxfmtrc.json was set to 'es5', so every formatted file diverged. Switch the config to 'all' to match the existing code, ignore docs/** and **/drizzle/** (prose + generated snapshots the formatter should not own), and reformat the source tree once for consistency. No behavioural change; all suites green (api 60, worker 28, admin 21).
This commit is contained in:
@@ -18,7 +18,7 @@ function renderApp() {
|
||||
return render(
|
||||
<QueryClientProvider client={queryClient}>
|
||||
<App />
|
||||
</QueryClientProvider>
|
||||
</QueryClientProvider>,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ describe('AuthContext signOut', () => {
|
||||
render(
|
||||
<AuthProvider>
|
||||
<SignOutButton />
|
||||
</AuthProvider>
|
||||
</AuthProvider>,
|
||||
);
|
||||
|
||||
await user.click(screen.getByRole('button', { name: 'Uitloggen' }));
|
||||
|
||||
@@ -28,10 +28,7 @@ describe('api client', () => {
|
||||
});
|
||||
|
||||
it('throws ApiError on a non-2xx response', async () => {
|
||||
vi.stubGlobal(
|
||||
'fetch',
|
||||
vi.fn().mockResolvedValue(new Response(null, { status: 401 })),
|
||||
);
|
||||
vi.stubGlobal('fetch', vi.fn().mockResolvedValue(new Response(null, { status: 401 })));
|
||||
|
||||
await expect(apiFetch('/api/me')).rejects.toMatchObject({ status: 401 });
|
||||
await expect(apiFetch('/api/me')).rejects.toBeInstanceOf(ApiError);
|
||||
|
||||
@@ -5,7 +5,7 @@ export const API_URL = import.meta.env.VITE_API_URL ?? 'http://localhost:3000';
|
||||
export class ApiError extends Error {
|
||||
constructor(
|
||||
public status: number,
|
||||
message: string
|
||||
message: string,
|
||||
) {
|
||||
super(message);
|
||||
this.name = 'ApiError';
|
||||
|
||||
@@ -21,7 +21,7 @@ function renderAccount() {
|
||||
<AuthProvider>
|
||||
<Account />
|
||||
</AuthProvider>
|
||||
</QueryClientProvider>
|
||||
</QueryClientProvider>,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ function renderHistory() {
|
||||
return render(
|
||||
<QueryClientProvider client={queryClient}>
|
||||
<History />
|
||||
</QueryClientProvider>
|
||||
</QueryClientProvider>,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@ function renderStopwatch() {
|
||||
return render(
|
||||
<QueryClientProvider client={queryClient}>
|
||||
<Stopwatch />
|
||||
</QueryClientProvider>
|
||||
</QueryClientProvider>,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -105,17 +105,17 @@ describe('Stopwatch', () => {
|
||||
mockedUseActivities.mockReturnValue(query<ReturnType<typeof useActivities>>([FREZEN, PRINTEN]));
|
||||
mockedUseActiveSessions.mockReturnValue(query<ReturnType<typeof useActiveSessions>>([]));
|
||||
mockedUseStartSession.mockReturnValue(
|
||||
mutation<ReturnType<typeof useStartSession>>(startMutate)
|
||||
mutation<ReturnType<typeof useStartSession>>(startMutate),
|
||||
);
|
||||
mockedUseStopSession.mockReturnValue(mutation<ReturnType<typeof useStopSession>>(stopMutate));
|
||||
mockedUseDiscardSession.mockReturnValue(
|
||||
mutation<ReturnType<typeof useDiscardSession>>(discardMutate)
|
||||
mutation<ReturnType<typeof useDiscardSession>>(discardMutate),
|
||||
);
|
||||
mockedUsePauseSession.mockReturnValue(
|
||||
mutation<ReturnType<typeof usePauseSession>>(pauseMutate)
|
||||
mutation<ReturnType<typeof usePauseSession>>(pauseMutate),
|
||||
);
|
||||
mockedUseResumeSession.mockReturnValue(
|
||||
mutation<ReturnType<typeof useResumeSession>>(resumeMutate)
|
||||
mutation<ReturnType<typeof useResumeSession>>(resumeMutate),
|
||||
);
|
||||
});
|
||||
|
||||
@@ -189,7 +189,7 @@ describe('Stopwatch', () => {
|
||||
const user = userEvent.setup();
|
||||
// Recover an active session so the screen renders the running UI.
|
||||
mockedUseActiveSessions.mockReturnValue(
|
||||
query<ReturnType<typeof useActiveSessions>>([activeSession()])
|
||||
query<ReturnType<typeof useActiveSessions>>([activeSession()]),
|
||||
);
|
||||
renderStopwatch();
|
||||
|
||||
@@ -197,7 +197,7 @@ describe('Stopwatch', () => {
|
||||
await user.click(cancel);
|
||||
|
||||
expect(
|
||||
screen.getByRole('button', { name: 'Nogmaals tikken ter bevestiging' })
|
||||
screen.getByRole('button', { name: 'Nogmaals tikken ter bevestiging' }),
|
||||
).toBeInTheDocument();
|
||||
|
||||
await user.click(screen.getByRole('button', { name: 'Nogmaals tikken ter bevestiging' }));
|
||||
@@ -208,7 +208,7 @@ describe('Stopwatch', () => {
|
||||
it('pauses via the server when the display is tapped while running', async () => {
|
||||
const user = userEvent.setup();
|
||||
mockedUseActiveSessions.mockReturnValue(
|
||||
query<ReturnType<typeof useActiveSessions>>([activeSession()])
|
||||
query<ReturnType<typeof useActiveSessions>>([activeSession()]),
|
||||
);
|
||||
renderStopwatch();
|
||||
|
||||
@@ -225,7 +225,7 @@ describe('Stopwatch', () => {
|
||||
mockedUseActiveSessions.mockReturnValue(
|
||||
query<ReturnType<typeof useActiveSessions>>([
|
||||
activeSession({ paused_at: new Date().toISOString(), paused_seconds: 30 }),
|
||||
])
|
||||
]),
|
||||
);
|
||||
renderStopwatch();
|
||||
|
||||
@@ -241,7 +241,7 @@ describe('Stopwatch', () => {
|
||||
mockedUseActiveSessions.mockReturnValue(
|
||||
query<ReturnType<typeof useActiveSessions>>([
|
||||
activeSession({ paused_at: new Date().toISOString(), paused_seconds: 30 }),
|
||||
])
|
||||
]),
|
||||
);
|
||||
renderStopwatch();
|
||||
|
||||
|
||||
@@ -118,7 +118,7 @@ export default function Stopwatch() {
|
||||
setPauseStartedMs(null);
|
||||
setNowMs(Date.now());
|
||||
},
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user