| app/composables/ .ts | tests/app/composables/ .test.ts | | app/components/ .vue | app/components/tests/ .test.ts (DOM tests) OR tests/app/components/ .test.ts (logic-only) | | app/utils/ .ts | tests/app/utils/ .test.ts | | services/ .ts | tests/services/ .test.ts | | utils/ .ts | tests/utils/ .test.ts |
| terraform/lambda/src/ /index.ts | terraform/lambda/src/ /tests/index.test.ts |
Use tests/ co-location only for component DOM tests and Lambda handlers. Everything else goes in the top-level tests/ mirror tree.
이 Nuxt 4 프로젝트에 대한 Vitest 단위 테스트를 작성하고 실행하세요. 컴포저블, 구성 요소, 서비스, 유틸리티 또는 Lambda 핸들러를 생성하거나 수정할 때 자동 트리거됩니다. 테스트 작성, 테스트 적용 범위 추가, 새로운 기능 테스트, 버그 수정(회귀 테스트 먼저 작성) 또는 사용자가 테스트, 단위 테스트, vitest, TDD, 적용 범위 또는 테스트 적용 범위를 언급할 때마다 이 기술을 사용하십시오. app/composables/, app/comComponents/, app/utils/, services/ 또는 terraform/lambda/src/에서 새 파일을 생성할 때도 사용합니다. 출처: ralphcrisostomo/nuxt-development-skills.