Mock clocks in testing help speed up time-dependent operations and prevent timer leaks, but often create unrealistic execution orders and require manual time advancement. Auto-advancing mock clocks solve these issues by automatically progressing time like real clocks, eliminating the need for explicit tick() calls and making

8m read timeFrom blog.angular.dev
Post cover image
Table of contents
Why use a mock clockCommon pitfalls with mock clocksGet Andrew Scott’s stories in your inboxProposal: Allow mock clocks to automatically advance timeUse casesWhat’s next

Sort: