Spaces:
Paused
Paused
Download web/src/App.test.js from GXSNetwork/GreenPlusbyGXS: direct link, hf CLI and curl.
- Browser
- Download file 775 Bytes
-
https://huggingface.co/spaces/GXSNetwork/GreenPlusbyGXS/resolve/main/web/src/App.test.js
- Command line
-
hf download hf://spaces/GXSNetwork/GreenPlusbyGXS/web/src/App.test.js
-
curl -L -o App.test.js https://huggingface.co/spaces/GXSNetwork/GreenPlusbyGXS/resolve/main/web/src/App.test.js
775 Bytes
| import React from 'react'; | |
| import { render, screen } from '@testing-library/react'; | |
| import '@testing-library/jest-dom'; | |
| import SimpleComponent from './SimpleComponent'; // We are importing our new simple component | |
| // Test 1: Check if our simple component renders. | |
| test('renders the simple component without crashing', () => { | |
| render(<SimpleComponent />); | |
| const titleElement = screen.getByText(/EcoSpire Test Passed/i); | |
| expect(titleElement).toBeInTheDocument(); | |
| }); | |
| // Test 2: Check for the paragraph in our simple component. | |
| test('shows the success message in the simple component', () => { | |
| render(<SimpleComponent />); | |
| const messageElement = screen.getByText(/Component rendered successfully/i); | |
| expect(messageElement).toBeInTheDocument(); | |
| }); |