style: align multiline ternary operators
Backend security / security (push) Successful in 8s
Backend verify / verify (push) Failing after 2m11s
Backend security / security (pull_request) Successful in 8s
Backend verify / verify (pull_request) Failing after 2m17s
Conventional commits / commits (pull_request) Successful in 34s

This commit is contained in:
2026-09-28 12:33:56 +03:00
parent 9cc9fbdcff
commit 0303e60b64
54 changed files with 986 additions and 982 deletions
+7 -7
View File
@@ -64,13 +64,13 @@ async function check(name, overrides = {}, signal) {
'user database must be untouched',
);
const expected =
signal === 'SIGINT' ?
130 :
signal === 'SIGTERM' ?
143 :
overrides.PRISMA_SCHEMA_ENGINE_BINARY ?
1 :
0;
signal === 'SIGINT'
? 130
: signal === 'SIGTERM'
? 143
: overrides.PRISMA_SCHEMA_ENGINE_BINARY
? 1
: 0;
assert.equal(code, expected, `See ${name}.log`);
console.log(`PASS ${name}: ${dirs.length} isolated databases`);
}
+5 -5
View File
@@ -9,11 +9,11 @@ const available = readdirSync(__dirname)
.sort();
const requested = process.argv.slice(2);
const suites =
requested.length === 0 ?
['app.e2e-spec.ts', 'bank-cards.e2e-spec.ts'] :
requested.length === 1 && requested[0] === '--all' ?
available :
requested;
requested.length === 0
? ['app.e2e-spec.ts', 'bank-cards.e2e-spec.ts']
: requested.length === 1 && requested[0] === '--all'
? available
: requested;
if (suites.some((suite) => !available.includes(suite))) {
throw new Error('Unknown e2e suite');
}
+3 -3
View File
@@ -240,9 +240,9 @@ describe('persistent ledger HTTP and cursor (SQLite)', () => {
data: { occurredAt: new Date(observedAt.valueOf() - 1000) },
});
const query =
periodKind === 'default' ?
'' :
`&to=${observedAt.toISOString().slice(0, 10)}${periodKind === 'today timestamp' ? 'T23:59:59.999Z' : ''}`;
periodKind === 'default'
? ''
: `&to=${observedAt.toISOString().slice(0, 10)}${periodKind === 'today timestamp' ? 'T23:59:59.999Z' : ''}`;
const page = (cursor?: string, observe = false) =>
request(app.getHttpServer())
.get(
+3 -3
View File
@@ -339,9 +339,9 @@ describe('local accounts and portfolio HTTP (SQLite)', () => {
]);
await put().expect(200);
upstream.getPortfolio.mockImplementation((_token, id) =>
id === 'second' ?
Promise.reject(new Error('synthetic unavailable')) :
Promise.resolve({
id === 'second'
? Promise.reject(new Error('synthetic unavailable'))
: Promise.resolve({
positions: [
{
instrumentUid: uid,
+3 -3
View File
@@ -351,9 +351,9 @@ describe('durable shared instrument metadata (SQLite)', () => {
await service.read('owner', identity);
await settled();
const identities = Array.from({ length: 1000 }, (_, index) =>
index ?
{ instrumentUid: `uid-${index}`, figi: `FIGI-${index}` } :
identity,
index
? { instrumentUid: `uid-${index}`, figi: `FIGI-${index}` }
: identity,
);
const saved = await service.savedMany(identities);
expect(saved.size).toBe(1000);
+12 -12
View File
@@ -58,9 +58,9 @@ describe('T-Bank persisted read budget', () => {
const operations = Array.from({ length: 100_000 }, (_, index) => {
// 1,000 measured-month rows, 200 income receipts, remaining rows over 10 years.
const time =
index < 1000 ?
Date.UTC(2026, 7, 1) + index * 2_500_000 :
Date.UTC(2016, 8, 1) + (index - 1000) * 3_160_000;
index < 1000
? Date.UTC(2026, 7, 1) + index * 2_500_000
: Date.UTC(2016, 8, 1) + (index - 1000) * 3_160_000;
const instrument = instruments[index % instruments.length];
return {
id: `operation-${index}`,
@@ -298,9 +298,9 @@ describe('T-Bank persisted read budget', () => {
uid: instrument.uid,
ticker: instrument.ticker,
instrumentType:
instrument.instrumentKind === 'INSTRUMENT_TYPE_SHARE' ?
'share' :
'bond',
instrument.instrumentKind === 'INSTRUMENT_TYPE_SHARE'
? 'share'
: 'bond',
metadata: instrument,
fetchedAt: now,
},
@@ -487,13 +487,13 @@ describe('T-Bank persisted read budget', () => {
runtime: process.version,
hardware: {
cpuQuota:
process.platform === 'linux' ?
readFileSync('/sys/fs/cgroup/cpu.max', 'utf8').trim() :
null,
process.platform === 'linux'
? readFileSync('/sys/fs/cgroup/cpu.max', 'utf8').trim()
: null,
memoryLimit:
process.platform === 'linux' ?
readFileSync('/sys/fs/cgroup/memory.max', 'utf8').trim() :
null,
process.platform === 'linux'
? readFileSync('/sys/fs/cgroup/memory.max', 'utf8').trim()
: null,
cpu: cpus()[0]?.model,
cpus: cpus().length,
memoryBytes: totalmem(),
+3 -3
View File
@@ -358,9 +358,9 @@ describe('screen sync HTTP and SQLite', () => {
}),
)
.mockImplementation(() =>
outcome === 'failed' ?
Promise.reject(new Error('Synthetic outage')) :
Promise.resolve({ hasNext: false, items: [] }),
outcome === 'failed'
? Promise.reject(new Error('Synthetic outage'))
: Promise.resolve({ hasNext: false, items: [] }),
);
const accept = async (from: string, to: string) => {
const response = await post({
+3 -3
View File
@@ -296,9 +296,9 @@ describe('saved payout calendars and complete forecasts (SQLite HTTP)', () => {
.body as UpcomingEventsResourceDto;
await portfolio([position(shareUid, '7'), position(newUid, '5')]);
upstream.getDividends.mockImplementation((_token: string, uid: string) =>
uid === newUid ?
Promise.reject(new Error('new calendar unavailable')) :
Promise.resolve([]),
uid === newUid
? Promise.reject(new Error('new calendar unavailable'))
: Promise.resolve([]),
);
const pending = (await events(false).expect(200))
.body as UpcomingEventsResourceDto;