Fix TypeScript error in MockSchedulerService test

Use non-null assertion for resolveBlock since TypeScript cannot track
the async reassignment across the setTimeout boundary.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
This commit is contained in:
Fredrik Adelöw
2026-03-10 13:59:40 +01:00
parent 25157bec8d
commit c0b9c63be4
@@ -261,7 +261,7 @@ describe('MockSchedulerService', () => {
resolveBlock = undefined;
const triggerPromise2 = blockingScheduler.triggerTask('blocking');
await setTimeout(1);
resolveBlock?.();
resolveBlock!();
await triggerPromise2;
expect(signals).toHaveLength(3);