Skip to content

Commit 705ded6

Browse files
committed
Lint
1 parent 2d05729 commit 705ded6

3 files changed

Lines changed: 18 additions & 28 deletions

File tree

e2e-tests/tests/simulation.test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,7 @@ test.describe.serial('Simulation', async () => {
6868
test(`Streaming pipeline: indicator settles + canvases render across two re-sims`, async () => {
6969
const timelineErrorIndicator = setup.plan.page.getByRole('status', { name: 'Timeline data error' });
7070
const timelineLoadingIndicator = setup.plan.page.getByRole('status', { name: 'Timeline loading' });
71-
const timelineCanvasContent = () =>
72-
anyCanvasHasContent(setup.page, '[data-component-name="TimelinePanel"] canvas');
71+
const timelineCanvasContent = () => anyCanvasHasContent(setup.page, '[data-component-name="TimelinePanel"] canvas');
7372

7473
await setup.plan.reRunSimulation();
7574
await expect(timelineErrorIndicator).not.toBeVisible();

src/stores/externalResource.test.ts

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -235,9 +235,7 @@ describe('createExternalResourceSubscription', () => {
235235

236236
// Duration grows (backend appended more segments). Trigger via a
237237
// metadata push with the new duration.
238-
getExternalProfileSegmentsSinceMock.mockResolvedValueOnce(
239-
segments([{ start_offset: '00:01:00', value: 'C' }]),
240-
);
238+
getExternalProfileSegmentsSinceMock.mockResolvedValueOnce(segments([{ start_offset: '00:01:00', value: 'C' }]));
241239
planDatasetsValue.set([
242240
makePlanDataset({ datasetId: 1, profiles: [makeProfile({ duration: '00:02:00', id: 11, name: 'r' })] }),
243241
]);
@@ -269,9 +267,7 @@ describe('createExternalResourceSubscription', () => {
269267
});
270268

271269
test('profile-row switch resets accumulator and refetches with sentinel offset', async () => {
272-
getExternalProfileSegmentsSinceMock.mockResolvedValueOnce(
273-
segments([{ start_offset: '00:00:30', value: 'A' }]),
274-
);
270+
getExternalProfileSegmentsSinceMock.mockResolvedValueOnce(segments([{ start_offset: '00:00:30', value: 'A' }]));
275271

276272
const profileA = makeProfile({ duration: '00:01:00', id: 11, name: 'r' });
277273
planDatasetsValue.set([makePlanDataset({ datasetId: 1, profiles: [profileA] })]);
@@ -286,9 +282,7 @@ describe('createExternalResourceSubscription', () => {
286282
// A different profile under the same name (different id and dataset)
287283
// wins on the next tick. Accumulator must reset and refetch with the
288284
// sentinel.
289-
getExternalProfileSegmentsSinceMock.mockResolvedValueOnce(
290-
segments([{ start_offset: '00:00:00', value: 'B' }]),
291-
);
285+
getExternalProfileSegmentsSinceMock.mockResolvedValueOnce(segments([{ start_offset: '00:00:00', value: 'B' }]));
292286
const profileB = makeProfile({ duration: '00:01:00', id: 99, name: 'r' });
293287
planDatasetsValue.set([makePlanDataset({ datasetId: 2, profiles: [profileB] })]);
294288
await flushPromises();

src/stores/timelineResourceStatus.ts

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -45,24 +45,21 @@ export const timelineResourcesLoading: Readable<boolean> = derived(resourceState
4545
return false;
4646
});
4747

48-
export const timelineResourcesErroring: Readable<TimelineResourceError[]> = derived(
49-
resourceStates,
50-
$resourceStates => {
51-
const errors: TimelineResourceError[] = [];
52-
for (const [key, s] of $resourceStates.entries()) {
53-
if (s.error) {
54-
const colon = key.indexOf(':');
55-
errors.push({
56-
datasetId: Number(key.slice(0, colon)),
57-
error: s.error,
58-
kind: s.kind,
59-
name: key.slice(colon + 1),
60-
});
61-
}
48+
export const timelineResourcesErroring: Readable<TimelineResourceError[]> = derived(resourceStates, $resourceStates => {
49+
const errors: TimelineResourceError[] = [];
50+
for (const [key, s] of $resourceStates.entries()) {
51+
if (s.error) {
52+
const colon = key.indexOf(':');
53+
errors.push({
54+
datasetId: Number(key.slice(0, colon)),
55+
error: s.error,
56+
kind: s.kind,
57+
name: key.slice(colon + 1),
58+
});
6259
}
63-
return errors;
64-
},
65-
);
60+
}
61+
return errors;
62+
});
6663

6764
function registryKey(datasetId: number, name: string): string {
6865
return `${datasetId}:${name}`;

0 commit comments

Comments
 (0)