Zum Inhalt springen
Kitbay
Skill

enforce-rules-for-vitest

MITAktualisiert am 13. Nov. 202651.383GitHub-Sterne

A contributor skill in the AIRI repository that sets the rules for writing, reviewing and debugging Vitest tests in its monorepo.

Was der Skill vermittelt

A contributor skill in the AIRI repository that sets the rules for writing, reviewing and debugging Vitest tests in its monorepo. It asks for the smallest test that really exercises the behaviour, run only in the owning Vitest project, with browser mode where DOM or web platform APIs matter. Reported bugs get a reproduction test named after the GitHub issue or Linear key that fails first, then a root cause comment after the fix. Mocks belong only at real boundaries such as Electron IPC and outside services, never on Pinia or Vue components or global built-ins, and import failures must be fixed in the production code rather than hidden with test tricks.

Funktionen

  • Choose the smallest suitable Vitest test
  • Write a failing reproduction for a reported bug
  • Mock only at real runtime boundaries
  • Fix import failures in production code