| trigger |
|---|
always_on |
This is the source code for the Angular framework. This guide outlines standard practices for AI agents working in this repository.
- Use
pnpmfor package management. - Use
pnpm bazel test //targetto run tests.
- Building and Testing: definitive guide for running targets.
- Coding Standards: style guide for TypeScript and other files.
- Commit Guidelines: format for commit messages and PR titles.
- Zoneless & Async-First: Assume a zoneless environment where state changes schedule updates asynchronously.
- Do NOT use
fixture.detectChanges()to manually trigger updates. - ALWAYS use the "Act, Wait, Assert" pattern:
- Act: Update state or perform an action.
- Wait:
await fixture.whenStable()to allow the framework to process the scheduled update. - Assert: Verify the output.
- Do NOT use
- To keep tests fast, minimize the need for waiting:
- Use
useAutoTick()(frompackages/private/testing/src/utils.ts) to fast-forward time via the mock clock.
- Use
- When waiting is necessary, use real async tests (
it('...', async () => { ... })) along with:await timeout(ms)(frompackages/private/testing/src/utils.ts) to wait a specific number of milliseconds.await fixture.whenStable()to wait for framework stability.
- Use the
ghCLI (GitHub CLI) for creating and managing pull requests.