testing of example
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2024-11-28 17:17:04 +01:00
parent c569a79cf1
commit 11d63ce765
10 changed files with 108 additions and 21 deletions

View File

@@ -0,0 +1,20 @@
{
"name": "client",
"version": "1.0.0",
"private": true,
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --watchAll=false",
"eject": "react-scripts eject"
},
"dependencies": {
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-scripts": "5.0.1"
},
"devDependencies": {
"@testing-library/react": "^13.0.0",
"jest": "^29.0.0"
}
}

View File

@@ -0,0 +1,11 @@
import React from 'react';
function App() {
return (
<div>
<h1>Hello, World!</h1>
</div>
);
}
export default App;

View File

@@ -0,0 +1,8 @@
import { render, screen } from '@testing-library/react';
import App from './App';
test('renders Hello, World!', () => {
render(<App />);
const headingElement = screen.getByText(/Hello, World!/i);
expect(headingElement).toBeInTheDocument();
});