# Vue 테스팅 (Vue.js / Nuxt.js) > Vitest, Vue Test Utils, 컴포넌트 테스트, 모킹, 스냅샷 테스트, Playwright를 사용한 E2E - 20 면접 질문 - Mid-Level - [면접 질문: Vue.js / Nuxt.js](https://sharpskill.dev/ko/technologies/vue-nuxt/interview-questions.md) ## 1. Vitest란 무엇인가요? **답변** Vitest는 Vite 프로젝트를 위해 특별히 설계된 최신 단위 테스트 프레임워크입니다. ESM 모듈에 대한 네이티브 호환성, 내장된 TypeScript 지원, 그리고 Vite와의 깊은 통합 덕분에 매우 빠른 실행을 제공합니다. Vitest는 Jest 호환 API를 제공하여 우수한 성능을 누리면서 기존 프로젝트를 쉽게 마이그레이션할 수 있습니다. ## 2. Vue Test Utils의 역할은 무엇인가요? **답변** Vue Test Utils는 테스트 환경에서 Vue 컴포넌트를 마운트하고 상호작용할 수 있는 유틸리티를 제공하는 Vue.js의 공식 테스트 라이브러리입니다. 컴포넌트를 렌더링하는 mount 및 shallowMount 같은 메서드와 더불어 사용자 상호작용을 시뮬레이션하고, props를 검증하고, emit된 이벤트를 캡처하고, 렌더링된 DOM을 검사하는 API를 노출합니다. 이 라이브러리는 Vue 컴포넌트를 격리된 방식으로 테스트하는 데 필수적입니다. ## 3. mount와 shallowMount의 주요 차이점은 무엇인가요? **답변** mount는 모든 자식 컴포넌트를 재귀적으로 포함하여 전체 컴포넌트를 렌더링하므로 완전한 DOM 트리를 생성합니다. shallowMount는 모든 자식 컴포넌트를 자동으로 빈 스텁으로 대체하여 최상위 컴포넌트만 렌더링합니다. 격리가 가장 중요한 엄격한 단위 테스트에는 shallowMount를, 부모-자식 컴포넌트 간 상호작용을 검증해야 하는 통합 테스트에는 mount를 사용합니다. ## 17개 추가 질문 이용 가능 - Vue/Nuxt 프로젝트에서 Vitest를 어떻게 구성하나요? - 어떤 wrapper 메서드로 CSS 선택자를 사용해 요소를 찾을 수 있나요? 무료로 가입하기: https://sharpskill.dev/ko/login ## 기타 Vue.js / Nuxt.js 면접 주제 - [JavaScript 기초](https://sharpskill.dev/ko/technologies/vue-nuxt/interview-questions/javascript-fundamentals.md): 20개 질문, Junior - [모던 JavaScript (ES6+)](https://sharpskill.dev/ko/technologies/vue-nuxt/interview-questions/es6-modern-javascript.md): 20개 질문, Junior - [Vue 기초](https://sharpskill.dev/ko/technologies/vue-nuxt/interview-questions/vue-basics.md): 22개 질문, Junior - [Vue 컴포넌트](https://sharpskill.dev/ko/technologies/vue-nuxt/interview-questions/vue-components.md): 20개 질문, Junior - [Vue Router](https://sharpskill.dev/ko/technologies/vue-nuxt/interview-questions/vue-router.md): 18개 질문, Junior - [Pinia State Management](https://sharpskill.dev/ko/technologies/vue-nuxt/interview-questions/pinia-state-management.md): 20개 질문, Junior - [Vuex (Legacy)](https://sharpskill.dev/ko/technologies/vue-nuxt/interview-questions/vuex-legacy.md): 15개 질문, Mid-Level - [Composition API](https://sharpskill.dev/ko/technologies/vue-nuxt/interview-questions/composition-api.md): 24개 질문, Mid-Level - [Vue 반응성](https://sharpskill.dev/ko/technologies/vue-nuxt/interview-questions/vue-reactivity.md): 20개 질문, Mid-Level - [Nuxt 기초](https://sharpskill.dev/ko/technologies/vue-nuxt/interview-questions/nuxt-fundamentals.md): 22개 질문, Mid-Level - [Nuxt 데이터 페칭](https://sharpskill.dev/ko/technologies/vue-nuxt/interview-questions/nuxt-data-fetching.md): 20개 질문, Mid-Level - [Nuxt SSR 및 SSG](https://sharpskill.dev/ko/technologies/vue-nuxt/interview-questions/nuxt-ssr-ssg.md): 22개 질문, Mid-Level - [Nuxt 서버 라우트](https://sharpskill.dev/ko/technologies/vue-nuxt/interview-questions/nuxt-server-routes.md): 20개 질문, Mid-Level - [Nuxt 모듈](https://sharpskill.dev/ko/technologies/vue-nuxt/interview-questions/nuxt-modules.md): 18개 질문, Mid-Level - [Vue 컴포저블](https://sharpskill.dev/ko/technologies/vue-nuxt/interview-questions/vue-composables.md): 20개 질문, Mid-Level - [Vue 폼과 유효성 검사](https://sharpskill.dev/ko/technologies/vue-nuxt/interview-questions/vue-forms-validation.md): 20개 질문, Mid-Level - [Nuxt 상태 관리](https://sharpskill.dev/ko/technologies/vue-nuxt/interview-questions/nuxt-state-management.md): 18개 질문, Mid-Level - [Nuxt 배포 및 CI/CD](https://sharpskill.dev/ko/technologies/vue-nuxt/interview-questions/nuxt-deployment-cicd.md): 22개 질문, Mid-Level - [Vue 성능](https://sharpskill.dev/ko/technologies/vue-nuxt/interview-questions/vue-performance.md): 22개 질문, Senior - [Vue 고급 패턴](https://sharpskill.dev/ko/technologies/vue-nuxt/interview-questions/vue-advanced-patterns.md): 24개 질문, Senior - [Vue와 함께 사용하는 TypeScript](https://sharpskill.dev/ko/technologies/vue-nuxt/interview-questions/typescript-vue.md): 22개 질문, Senior - [Nuxt 인증](https://sharpskill.dev/ko/technologies/vue-nuxt/interview-questions/nuxt-auth.md): 20개 질문, Senior - [Nuxt에서의 SEO](https://sharpskill.dev/ko/technologies/vue-nuxt/interview-questions/nuxt-seo.md): 20개 질문, Senior - [Nuxt 국제화](https://sharpskill.dev/ko/technologies/vue-nuxt/interview-questions/nuxt-i18n.md): 18개 질문, Senior - [Vue 아키텍처](https://sharpskill.dev/ko/technologies/vue-nuxt/interview-questions/vue-architecture.md): 22개 질문, Senior - [Nuxt 보안](https://sharpskill.dev/ko/technologies/vue-nuxt/interview-questions/nuxt-security.md): 20개 질문, Senior - [Vue 생태계](https://sharpskill.dev/ko/technologies/vue-nuxt/interview-questions/vue-ecosystem.md): 18개 질문, Senior - [Vue 2→3 및 Nuxt 2→3 마이그레이션](https://sharpskill.dev/ko/technologies/vue-nuxt/interview-questions/migration-vue2-vue3-nuxt2-nuxt3.md): 22개 질문, Senior --- Source: SharpSkill (https://sharpskill.dev), tech interview preparation for your real stack. HTML version of this page: https://sharpskill.dev/ko/technologies/vue-nuxt/interview-questions/vue-testing