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:
@@ -236,7 +236,7 @@ describe('activities routes', () => {
|
||||
expect(after.map((r) => r.id)).toEqual(ids);
|
||||
// In particular, b now precedes a.
|
||||
expect(after.findIndex((r) => r.id === b.id)).toBeLessThan(
|
||||
after.findIndex((r) => r.id === a.id)
|
||||
after.findIndex((r) => r.id === a.id),
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ async function completedSession(
|
||||
token: string,
|
||||
activityId: number,
|
||||
insoleType: string,
|
||||
durationSeconds: number
|
||||
durationSeconds: number,
|
||||
): Promise<number> {
|
||||
const startRes = await app.request('/api/sessions/start', {
|
||||
method: 'POST',
|
||||
@@ -47,13 +47,13 @@ describe('csv export', () => {
|
||||
expect(res.status).toBe(200);
|
||||
expect(res.headers.get('content-type')).toContain('text/csv');
|
||||
expect(res.headers.get('content-disposition')).toBe(
|
||||
'attachment; filename="insole-production-report.csv"'
|
||||
'attachment; filename="insole-production-report.csv"',
|
||||
);
|
||||
|
||||
const text = await res.text();
|
||||
const lines = text.split('\n');
|
||||
expect(lines[0]).toBe(
|
||||
'"ID","Task","Insole Type","No. of Insoles","Date","Total Duration","Paused Duration","Start Time","End Time"'
|
||||
'"ID","Task","Insole Type","No. of Insoles","Date","Total Duration","Paused Duration","Start Time","End Time"',
|
||||
);
|
||||
expect(lines).toHaveLength(2);
|
||||
expect(lines[1]).toContain('"Frezen"');
|
||||
|
||||
@@ -27,7 +27,7 @@ export async function createTestUser(email: string, role: 'worker' | 'admin' = '
|
||||
export async function authToken(
|
||||
app: Hono,
|
||||
email: string,
|
||||
role: 'worker' | 'admin' = 'worker'
|
||||
role: 'worker' | 'admin' = 'worker',
|
||||
): Promise<string> {
|
||||
await createTestUser(email, role);
|
||||
const signin = await app.request('/api/auth/sign-in/email', {
|
||||
@@ -47,7 +47,7 @@ export function bearer(token: string): Record<string, string> {
|
||||
// Insert an activity straight into the DB (test setup that should not depend on authz).
|
||||
export async function seedActivity(
|
||||
name: string,
|
||||
insoleTypes: string[] = ['Kurk', 'Berk', '3D']
|
||||
insoleTypes: string[] = ['Kurk', 'Berk', '3D'],
|
||||
): Promise<number> {
|
||||
const [row] = await db.insert(activities).values({ name, insoleTypes }).returning();
|
||||
return row.id;
|
||||
|
||||
@@ -33,7 +33,7 @@ describe('seed', () => {
|
||||
|
||||
await seed();
|
||||
expect(await db.select().from(user).where(eq(user.email, 'admin@solelog.local'))).toHaveLength(
|
||||
1
|
||||
1,
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -378,7 +378,7 @@ describe('session reads', () => {
|
||||
const body = await res.json();
|
||||
expect(body).toHaveLength(2);
|
||||
expect(new Date(body[0].start_time).getTime()).toBeGreaterThan(
|
||||
new Date(body[1].start_time).getTime()
|
||||
new Date(body[1].start_time).getTime(),
|
||||
);
|
||||
expect(body[0].activity_name).toBe('Slijpen');
|
||||
expect(body[1].activity_name).toBe('Frezen');
|
||||
|
||||
Reference in New Issue
Block a user