4.4-4.7: set up vitest, react-testing-library, cypress; add component/E2E tests

This commit is contained in:
parsa aghaei committed 2026-06-23 18:42:40 +03:30
1 parent 3a0c5746b7
commit fcb7db4d06
8 files changed
+1930 -41

No files matched your search

+26
View File
@@ -0,0 +1,26 @@
import { render, screen } from '@testing-library/react';
import { describe, it, expect } from 'vitest';
import Services from '@/app/(routes)/(website)/components/services/services';
const mockDict = {
website: {
homePage: {
services: {
title: 'Services',
description: 'What I do',
},
},
},
};
describe('Services Component', () => {
it('renders the services section title', () => {
render(<Services dict={mockDict} />);
expect(screen.getByText('Services')).toBeInTheDocument();
});
it('renders the services section description', () => {
render(<Services dict={mockDict} />);
expect(screen.getByText('What I do')).toBeInTheDocument();
});
});
+1
View File
@@ -0,0 +1 @@
import '@testing-library/jest-dom';