This PR adds tests for the components and utility functions in the project. It sets up the testing environment using Jest and React Testing Library, configures Jest to work with TypeScript and React, and adds necessary scripts in the package.json file.
Summary
Set up the testing environment by installing Jest and React Testing Library and configuring Jest to work with TypeScript and React.
Added scripts in the package.json file for running tests and generating test coverage.
Created a jest.config.js file to configure Jest.
Created test files for the following components:
components/TradingView: Wrote tests for the TradingView component.
components/background: Wrote tests for the background component.
components/icons: Wrote tests for the icons component.
components/navbar: Wrote tests for the navbar component.
components/ui/button: Wrote tests for the button component.
components/ui/navigation-menu: Wrote tests for the navigation-menu component.
Created a test file for the utility functions in the lib/utils.ts file and wrote tests for each utility function.
These tests ensure that the components and utility functions work as expected and any future changes do not break existing functionalities.
Fixes #1.
To checkout this PR branch, run the following command in your terminal:
git checkout sweep/add-tests
To get Sweep to edit this pull request, leave a comment below or in the code. Leaving a comment in the code will only modify the file but commenting below can change the entire PR.
Description
This PR adds tests for the components and utility functions in the project. It sets up the testing environment using Jest and React Testing Library, configures Jest to work with TypeScript and React, and adds necessary scripts in the
package.json
file.Summary
package.json
file for running tests and generating test coverage.jest.config.js
file to configure Jest.components/TradingView
: Wrote tests for theTradingView
component.components/background
: Wrote tests for thebackground
component.components/icons
: Wrote tests for theicons
component.components/navbar
: Wrote tests for thenavbar
component.components/ui/button
: Wrote tests for thebutton
component.components/ui/navigation-menu
: Wrote tests for thenavigation-menu
component.lib/utils.ts
file and wrote tests for each utility function.These tests ensure that the components and utility functions work as expected and any future changes do not break existing functionalities.
Fixes #1.
To checkout this PR branch, run the following command in your terminal:
To get Sweep to edit this pull request, leave a comment below or in the code. Leaving a comment in the code will only modify the file but commenting below can change the entire PR.