Skip to content
Shreelaxmi Hegde edited this page Feb 2, 2026 · 4 revisions

Notes

Component Testing

  • @testing-library/jest-dom/vitest to match DOM. Ex: .toHaveTextContent(/logout/i)
  • added react plugin that was causing 'ReferenceError: React is not defined' error on running test.
//vitest.config.js
import react from '@vitejs/plugin-react-swc';

export default defineConfig({
    plugins: [react()],
//

Clone this wiki locally