Skip to content
Kitbay
Skill

gpui-test

NOASSERTIONUpdated on Nov 11, 202694,739GitHub stars

A contributor skill in the Zed editor's repository for writing and debugging tests of GPUI, Zed's UI framework.

What the skill teaches

A contributor skill in the Zed editor's repository for writing and debugging tests of GPUI, Zed's UI framework. It explains what the gpui::test macro does (a deterministic scheduler that can run a test under many seeds), which context arguments a test can take, and options such as iterations, seeds and retries. It gives a reproduction routine: run the narrowest filter, sweep seeds to find a failing one, pin it with SEED, print pending task traces for parking failures, use GPUI timers instead of outside ones, then shrink the case while keeping the seed fixed. It lists common causes of flaky failures and advises against adding retries to hide a bug.

Capabilities

  • Reproduce flaky GPUI tests with a fixed scheduler seed
  • Diagnose parking failures with pending task traces
  • Write deterministic GPUI tests with seeded data