mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-28 23:50:08 +00:00
style: plain punctuation in the new comments and test names
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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' });
|
||||
|
||||
|
||||
@@ -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' });
|
||||
|
||||
Reference in New Issue
Block a user