test(dashboard): format the idle tick changes

This commit is contained in:
4gray committed 2026-09-29 20:48:55 +02:00
1 parent 4e512c1fd9
commit 81f78dea8c
5 files changed
+19 -12

No files matched your search

@@ -348,7 +348,11 @@ describe('DashboardLiveEpgPresenter', () => {
});
it('asks a guide again only once a programme on air has ended', () => {
const fromA = card({ id: 'a', epgLookupKey: 'ard.de', epgPlaylistId: 'a' });
const fromA = card({
id: 'a',
epgLookupKey: 'ard.de',
epgPlaylistId: 'a',
});
getCurrentProgramsForChannels.mockImplementation(() =>
of(new Map([['ard.de', program('Tagesschau')]]))
);
@@ -370,7 +374,11 @@ describe('DashboardLiveEpgPresenter', () => {
});
it('moves progress on every clock tick while the programme is unchanged', () => {
const fromA = card({ id: 'a', epgLookupKey: 'ard.de', epgPlaylistId: 'a' });
const fromA = card({
id: 'a',
epgLookupKey: 'ard.de',
epgPlaylistId: 'a',
});
getCurrentProgramsForChannels.mockImplementation(() =>
of(new Map([['ard.de', program('Tagesschau')]]))
);
@@ -292,7 +292,8 @@ export function sameLiveEpgAnswers(
!program ||
!other ||
program.title !== other.title ||
epgTimestampMs(program, 'start') !== epgTimestampMs(other, 'start') ||
epgTimestampMs(program, 'start') !==
epgTimestampMs(other, 'start') ||
epgTimestampMs(program, 'stop') !== epgTimestampMs(other, 'stop')
) {
return false;
@@ -360,7 +360,9 @@ describe('DashboardRailComponent', () => {
card({ id: 'b', contentType: 'live', nowPlayingProgress: 21 }),
]);
expect(reset).not.toHaveBeenCalled();
expect(observers[0].observed).toHaveLength(observedAfterFirstRender);
expect(observers[0].observed).toHaveLength(
observedAfterFirstRender
);
// A newly watched channel moves to the front.
await rerender([
@@ -10,7 +10,9 @@ const DAY_MS = 86_400_000;
describe('createSourceExpiryClock', () => {
const nowMs = Date.UTC(2026, 7, 1, 12, 0, 0);
let facts: ReturnType<typeof signal<ReadonlyMap<string, SourceExpiryFacts>>>;
let facts: ReturnType<
typeof signal<ReadonlyMap<string, SourceExpiryFacts>>
>;
let clock: Signal<number>;
const expiringIn = (ms: number): SourceExpiryFacts => ({
@@ -1,10 +1,4 @@
import {
DestroyRef,
effect,
inject,
signal,
type Signal,
} from '@angular/core';
import { DestroyRef, effect, inject, signal, type Signal } from '@angular/core';
import { DOCUMENT } from '@angular/common';
import {
nextSourceExpiryChangeMs,