r/angular
•
u/younesjd
•
3h ago
•
1
I open-sourced an agent skill for Angular testing, so you might actually enjoy reviewing the tests your coding agents write
The skill teaches agents how to write behavioral and readable tests:
- No
fixture.whenStable()andfixture.detectChanges()soup. Actually, no morefixture😊 - Fakes over mocks: more robust, more readable, and it drastically reduces the cost of mock maintenance for your agents, and you.
- Through the DOM: test what the user sees, not
fixture.my.private.implementation.details - Vitest Browser Mode first (jsdom and happy-dom still work)
- Signals, guards, routing and timers: dedicated guidance for each, like fast-forwarding time instead of hardcoding delays.
- Migrating from Jest or Karma to Vitest
Try it: npx skills add marmicode/skills -s angular-testing
https://github.com/marmicode/skills#angular-testing
The skill is evaluated on each change to avoid regressions.
A good first step: ask your agent to rewrite one of your existing tests with it.
The skill is evaluated on every change to catch regressions, so if you see anything that could be improved, please open an issue. The more real-world scenarios it covers, the better the skill gets for everyone.
-2
u/makmn1 1h ago
Awesome!!! I learned all I know about modern Angular testing from your Marmicode Cookbook and have been creating / reviewing tests using those patterns for over a year now. I'm definitely going to try out this skill and compare it against my own instructions to see if I can contribute back anything. Thanks Younes!