Pular para o conteúdo
Kitbay
Skill

enforce-rules-for-vitest

MITAtualizado em 13 de nov. de 202651.383Estrelas no GitHub

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

O que a skill ensina

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.

O que faz

  • 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