➕ chore(deps-dev): add dependency @testing-library/react
This commit is contained in:
Generated
+952
File diff suppressed because it is too large
Load Diff
@@ -15,6 +15,7 @@
|
|||||||
"react-dom": "^18.2.0"
|
"react-dom": "^18.2.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@testing-library/react": "^14.1.2",
|
||||||
"@types/react": "^18.2.43",
|
"@types/react": "^18.2.43",
|
||||||
"@types/react-dom": "^18.2.17",
|
"@types/react-dom": "^18.2.17",
|
||||||
"@typescript-eslint/eslint-plugin": "^6.14.0",
|
"@typescript-eslint/eslint-plugin": "^6.14.0",
|
||||||
|
|||||||
+10
-1
@@ -1,9 +1,18 @@
|
|||||||
// Imports
|
// Imports
|
||||||
import { describe, it, expect } from 'vitest';
|
import { describe, it, expect } from 'vitest';
|
||||||
|
import { render, screen } from '@testing-library/react';
|
||||||
|
|
||||||
|
// To Test
|
||||||
|
import App from './App';
|
||||||
|
|
||||||
// Tests
|
// Tests
|
||||||
describe('Renders main page correctly', async () => {
|
describe('Renders main page correctly', async () => {
|
||||||
it('Should render the 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();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user