In lazy mode, Cosmos dynamically imports fixture and decorator modules only when they are needed, specifically when a fixture is selected in the Cosmos UI. This approach results in code splitting and enhances the isolation of the selected fixture. In this mode, fixture names of Multi-Fixtures are only revealed upon selection.
To enable lazy mode:
- Set the
truein the Cosmos config.
- Use the
--lazyCLI argument when running a Cosmos command.
Lazy mode is disabled by default.