chore(lint): keep the fixes within the lint ratchets

No promise in a condition, sequential awaits through a reduce instead of a loop, no non-null assertions or any in the new tests, an awaited act, one options object for a stop edit and a handled rejection for the offline copy.
This commit is contained in:
Maurice
2026-11-23 16:09:34 +01:00
parent f6d52727f7
commit 8a9f5367b1
15 changed files with 65 additions and 31 deletions
@@ -54,9 +54,9 @@ describe('script-settings', () => {
'SCRIPTSET-001: a PostgreSQL %i server gets the script without SET transaction_timeout, and nothing else changes',
async (major) => {
const expected = SCRIPT.replace('SET transaction_timeout = 0;\n', '');
for (const size of [1, 3, 7, 64, 1 << 20]) {
expect(await filtered(SCRIPT, major, size), `chunks of ${size}`).toBe(expected);
}
const sizes = [1, 3, 7, 64, 1 << 20];
const results = await Promise.all(sizes.map((size) => filtered(SCRIPT, major, size)));
results.forEach((result, i) => expect(result, `chunks of ${sizes[i]}`).toBe(expected));
},
);