angular / angular/components

Continue test harness execution if zone doesn't stabilize within a certain amount of time

Open
#24,051 0 comments 0 reactions 0 assignees View on GitHub
area: cdk/testing feature P3
Dominant language
TypeScript
Stars
25k
Forks
6.8k
Avg merge
1d 8h
Merged PRs (30d)
91

Description

Currently the test harnesses wait for the zone to stabilize before executing, however there are some cases where it might not happen. For example, in https://github.com/angular/components/issues/23964 the test times out because a Material component uses `requestAnimationFrame` which the browser can decide to pause if it's out of view.

One thing to consider is that Jasmine tests time out after 5s by default so we should pick a number that is lower.

Contributor guide

Open the contributing guide

Research direction

Start by locating the test harness code that waits for zone stabilization, then inspect how Jasmine's default 5-second timeout applies to these tests. Reproduce the requestAnimationFrame scenario described in angular/components#23964. Done means the harness continues when stabilization does not occur within a shorter limit, while normal stabilized execution remains unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
testing
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.