mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-03 17:41:51 +00:00
style: format server and shared with prettier
A mechanical prettier --write over server/src, server/tests, server/scripts and shared/src with the workspaces' .prettierrc; nothing but layout and import order changes, and every file keeps the same set of imports. shared is formatted throughout and its format baseline is empty. The server baseline keeps the 35 files that Prettier would grow past their lint:size limit (they need a split first, which is not a formatting change), and the generated entity files stay as their generator writes them.
This commit is contained in:
@@ -13,9 +13,9 @@
|
||||
* which `run()` below reads back out instead of treating the throw as a test
|
||||
* failure.
|
||||
*/
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { execFileSync } from 'node:child_process';
|
||||
import path from 'node:path';
|
||||
import { describe, it, expect } from 'vitest';
|
||||
|
||||
const SERVER_ROOT = path.join(__dirname, '../../..');
|
||||
const SCRIPT = path.join(SERVER_ROOT, 'scripts/db-call-graph.mjs');
|
||||
@@ -110,10 +110,15 @@ describe('db-call-graph.mjs', () => {
|
||||
// Non-empty lists exit 1 — that is what makes the CI step fail on a regression.
|
||||
expect(status).toBe(1);
|
||||
expect(syncDbMethodCount).toBe(2);
|
||||
expect(syncDbMethods.map((m) => `${m.class}.${m.method}`).sort()).toEqual(['SyncSample.readSync', 'SyncSample.writeInTx']);
|
||||
expect(syncDbMethods.map((m) => `${m.class}.${m.method}`).sort()).toEqual([
|
||||
'SyncSample.readSync',
|
||||
'SyncSample.writeInTx',
|
||||
]);
|
||||
expect(syncDbMethods.every((m) => m.file.endsWith('sync-db-sample.ts') && m.direct)).toBe(true);
|
||||
expect(transactionSiteCount).toBe(1);
|
||||
expect(transactionSites).toEqual([expect.objectContaining({ class: 'SyncSample', method: 'writeInTx', receiver: 'this.db' })]);
|
||||
expect(transactionSites).toEqual([
|
||||
expect.objectContaining({ class: 'SyncSample', method: 'writeInTx', receiver: 'this.db' }),
|
||||
]);
|
||||
// The unawaited fixture beside it stays clean under both flags.
|
||||
expect(syncDbMethods.some((m) => m.class === 'Sample')).toBe(false);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user