➕ chore(deps-dev): add dependency @testing-library/react

This commit is contained in:
2024-01-20 09:34:11 +01:00
parent 5d70849dfb
commit 39a553bf6a
3 changed files with 963 additions and 1 deletions
+952
View File
File diff suppressed because it is too large Load Diff
+1
View File
@@ -15,6 +15,7 @@
"react-dom": "^18.2.0"
},
"devDependencies": {
"@testing-library/react": "^14.1.2",
"@types/react": "^18.2.43",
"@types/react-dom": "^18.2.17",
"@typescript-eslint/eslint-plugin": "^6.14.0",
+10 -1
View File
@@ -1,9 +1,18 @@
// Imports
import { describe, it, expect } from 'vitest';
import { render, screen } from '@testing-library/react';
// To Test
import App from './App';
// Tests
describe('Renders main page correctly', async () => {
it('Should render the page correctly', async () => {
expect(true).toBeTruthy();
// Setup
render(<App />);
const h1 = await screen.queryByText('Vite + React');
// Expectations
expect(h1).not.toBeNull();
});
});