# Cypress — Component Testing ## React Setup ```bash npm install cypress @cypress/react --save-dev ``` ```javascript // cypress.config.js const { defineConfig } = require('cypress'); module.exports = defineConfig({ component: { devServer: { framework: 'react', bundler: 'vite', // or 'webpack' }, }, }); ``` ## React Component Test ```javascript import { mount } from '@cypress/react'; import Button from './Button'; describe('Button', () => { it('renders with text', () => { mount(