- Configured Jenkins FreeStyle job to trigger on push - Added `npm install` and `npm test` steps in Jenkins build configuration - Updated pre-push hook script to trigger Jenkins job and wait for test results - Installed jest, @testing-library/react, and @testing-library/jest-dom as dev dependencies for testing This commit sets up automated testing in Jenkins before code is pushed to the remote repository, ensuring code quality and preventing broken builds.
9 lines
278 B
JavaScript
9 lines
278 B
JavaScript
// __tests__/MapComponent.test.js
|
|
import { render, screen } from "@testing-library/react";
|
|
import MapComponent from "../components/MapComponent";
|
|
|
|
test("renders map component", () => {
|
|
render(<MapComponent />);
|
|
expect(screen.getByText("TALAS.Map")).toBeInTheDocument();
|
|
});
|