style: plain punctuation in the new comments and test names

This commit is contained in:
Maurice
2026-10-07 17:12:10 +02:00
parent 40bce5554d
commit 57df945318
11 changed files with 13 additions and 13 deletions
+1 -1
View File
@@ -358,7 +358,7 @@ export const mutationQueue = {
blockedTrips.add(mutation.tripId)
}
} else {
// No answer at all (network) or a retryable status — reset to
// No answer at all (network) or a retryable status: reset to
// pending and stop the flush; the next trigger retries.
await offlineDb.mutationQueue.update(mutation.id, {
status: 'pending',
+2 -2
View File
@@ -504,7 +504,7 @@ describe('mutationQueue.flush — failure handling (B3)', () => {
});
});
describe('mutationQueue.flush — a write the server keeps failing on', () => {
describe('mutationQueue.flush: a write the server keeps failing on', () => {
it('holds back only its own trip, with a growing gap, while other trips sync', async () => {
const stuck = generateUUID();
const sameTrip = generateUUID();
@@ -563,7 +563,7 @@ describe('mutationQueue.flush — a write the server keeps failing on', () => {
});
});
describe('mutationQueue — parked changes', () => {
describe('mutationQueue: parked changes', () => {
it('retryFailed puts them back in line from a fresh start and sends them', async () => {
const id = generateUUID();
await mutationQueue.enqueue(makeMutation({ id }));
@@ -438,7 +438,7 @@ describe('tripSyncManager.syncAll — logout while syncing', () => {
vi.mock('../../../src/repo/roadtripPreferencesRepo', () => ({ roadtripPreferencesRepo: { read: vi.fn(async () => ({})) } }))
describe('tripSyncManager.syncAll — deletions made elsewhere', () => {
describe('tripSyncManager.syncAll: deletions made elsewhere', () => {
it('drops cached rows the server no longer has, and keeps the ones created offline', async () => {
const tripId = 400;
const bundle = makeBundle(tripId);
@@ -193,7 +193,7 @@ export class CollabNotesRepository extends TrekRepository<CollabNotes> {
// -------------------------------------------------------------------------
/**
* CB6 (`formatNote`'s hydration read) — `SELECT id, filename, original_name,
* CB6 (`formatNote`'s hydration read): `SELECT id, filename, original_name,
* file_size, mime_type FROM trip_files WHERE note_id = ? AND deleted_at IS
* NULL`. A note's file can be moved to the trash from the file manager; it
* leaves the note then, as a chat attachment leaves its message.
@@ -931,7 +931,7 @@ export class UsersRepository extends TrekRepository<Users> {
* `SELECT id FROM users WHERE LOWER(email) = LOWER(?) [AND id != ?] AND COALESCE(is_guest, 0) = 0`
*
* Both sides folded by SQLite's own `LOWER()` (`lowerParam` binds the RAW
* value) — program rule 18. Every email collision check goes through here
* value), program rule 18. Every email collision check goes through here
* (profile, admin create and update), because login and the OIDC fallback
* match case-insensitively: a second account that differs only in case
* would make them pick whichever row comes first.
@@ -514,7 +514,7 @@ describe('UsersRepository', () => {
});
});
describe('findForPasswordReset (AU36) — case-insensitive, like login', () => {
describe('findForPasswordReset (AU36): case-insensitive, like login', () => {
it('USERSREPO-035: finds an address stored with capitals from the lowercased input the service passes', async () => {
const { user } = createUser(testDb, { email: 'Exact@Example.com' });
expect((await users.findForPasswordReset('exact@example.com'))?.id).toBe(user.id);
+1 -1
View File
@@ -991,7 +991,7 @@ describe('createUser — the pre-existing uniqueness-check TOCTOU window (AD2-4,
spy.mockRestore();
});
it('ADMIN-SVC-095 — an address that differs only in case is already taken, on create and on update', async () => {
it('ADMIN-SVC-095: an address that differs only in case is already taken, on create and on update', async () => {
const { user: existing } = createUser(testDb, { email: 'Case@Test.example.com' });
const { user: other } = createUser(testDb, { email: 'other-case@test.example.com' });
+2 -2
View File
@@ -1264,7 +1264,7 @@ describe('BACKUP-045 restoreFromZip — full success path (no uploads)', () => {
expect(callOrder.indexOf('closeDb')).toBeLessThan(callOrder.indexOf('copyFileSync'));
});
it('BACKUP-045g — keeps a copy of the database it replaces, before closing it', async () => {
it('BACKUP-045g: keeps a copy of the database it replaces, before closing it', async () => {
setupSuccessfulExtraction();
setupAllTablesPresent();
const { RequestContext } = await import('@mikro-orm/core');
@@ -1285,7 +1285,7 @@ describe('BACKUP-045 restoreFromZip — full success path (no uploads)', () => {
expect(logMock.logInfo).toHaveBeenCalledWith(expect.stringContaining('the replaced database was kept as'));
});
it('BACKUP-045h — a database that cannot be copied does not block the restore', async () => {
it('BACKUP-045h: a database that cannot be copied does not block the restore', async () => {
setupSuccessfulExtraction();
setupAllTablesPresent();
const { RequestContext } = await import('@mikro-orm/core');
@@ -85,7 +85,7 @@ describe('CronRegistrarService', () => {
expect(registrar.jobCount).toBe(0);
});
it('CRONREG-014 — a tick still running is not started again, and a failed tick reaches the app log', () => {
it('CRONREG-014: a tick still running is not started again, and a failed tick reaches the app log', () => {
const { registrar } = makeRegistrar(false);
registrar.register('slow-job', '0 * * * *', () => {});
const job = h.jobs[0]!;
@@ -165,7 +165,7 @@ describe('trip reminder tick', () => {
expect(logMock.logInfo).toHaveBeenCalledWith(expect.stringMatching(/^Trip reminders sent for 2 trip\(s\): /));
});
it('RJOB-012 — catches up a reminder the job missed, sends each one once, and again for a moved trip', async () => {
it('RJOB-012: catches up a reminder the job missed, sends each one once, and again for a moved trip', async () => {
const { user } = createUser(testDb);
// Due yesterday (start in 2 days, reminder 3 days ahead): the job did not run then.
const missed = createTrip(testDb, user.id, { title: 'Missed' });
+1 -1
View File
@@ -40,7 +40,7 @@ Before restoring, TREK runs integrity checks on the uploaded database:
1. **SQLite `PRAGMA integrity_check`** — verifies the database file is not corrupt.
2. **Required tables present** — confirms the file contains `users`, `trips`, `trip_members`, `places`, and `days`. Files missing any of these are rejected as not being a valid TREK backup.
3. **Not from a newer TREK** — a backup whose database a newer release migrated is refused with `This backup was made by a newer TREK version. Update TREK before restoring it.` Restoring it would leave this version unable to start.
3. **Not from a newer TREK**: a backup whose database a newer release migrated is refused with `This backup was made by a newer TREK version. Update TREK before restoring it.` Restoring it would leave this version unable to start.
The database being replaced is kept as `data/pre-restore-<time>.db`, so a restore of the wrong archive can be undone by hand. Delete these copies once you no longer need them.