Testing guidelines for Inertia Rails + Vitest + Typescript
spec/frontend/<filepath>
blog.ts
should create a test called blog.spec.ts
spec/frontend/__mocks__
- Frontend tests MUST be run after any code change to a frontend file. - If a test fails after a code change, the test MUST be updated to match the new behavior - Tests MUST be run by calling pnpm test <filename>
when testing a specific file - Tests MUST be run by calling bundle exec frontend:spec
when running tests for all files