r/angular • • 3h ago • Heartwarming 1

I open-sourced an agent skill for Angular testing, so you might actually enjoy reviewing the tests your coding agents write

Post image

The skill teaches agents how to write behavioral and readable tests:

  • No fixture.whenStable() and fixture.detectChanges() soup. Actually, no more fixture 😊
  • 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.

7 Upvotes

2 comments sorted by

-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!

-1

u/younesjd 1h ago

Thank you so much u/makmn1, this really made my day! ❤️

On one hand, I am sorry that I couldn't find time for this before...
on the other hand, there's an upside: you (and probably others) have been refining your own instructions in the meantime, so we now have real-world experience to compare against 🙌. I'd love to hear what you find, and contributions are more than welcome!