style(13-03): apply Prettier formatting across repo
Mechanical reformat — no logic changes. 398 files changed, 19125 insertions(+), 16457 deletions(-). Prettier 3.8.4 with .prettierrc (singleQuote:true, semi:true, tabWidth:2, trailingComma:all, printWidth:100). Isolated per D-13-08 for reviewability.
This commit is contained in:
@@ -15,9 +15,9 @@
|
||||
* Tests run against a local MariaDB dev database; production data is never touched.
|
||||
*/
|
||||
|
||||
import { afterEach } from 'vitest'
|
||||
import { db } from '../src/db/client.js'
|
||||
import { lists, listItems, listShares, pushSubscriptions } from '../src/db/schema.js'
|
||||
import { afterEach } from 'vitest';
|
||||
import { db } from '../src/db/client.js';
|
||||
import { lists, listItems, listShares, pushSubscriptions } from '../src/db/schema.js';
|
||||
|
||||
/**
|
||||
* Truncate list and push tables in FK-safe order after each test.
|
||||
@@ -28,12 +28,12 @@ import { lists, listItems, listShares, pushSubscriptions } from '../src/db/schem
|
||||
afterEach(async () => {
|
||||
try {
|
||||
// Delete child rows first to avoid FK constraint violations
|
||||
await db.delete(listItems)
|
||||
await db.delete(listShares)
|
||||
await db.delete(pushSubscriptions)
|
||||
await db.delete(lists)
|
||||
await db.delete(listItems);
|
||||
await db.delete(listShares);
|
||||
await db.delete(pushSubscriptions);
|
||||
await db.delete(lists);
|
||||
} catch {
|
||||
// DB may not be available in pure-unit test runs (no DB_HOST configured).
|
||||
// Swallow the error — pure-logic tests do not need cleanup.
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user