OpenHands
OpenHands copied to clipboard
test(frontend): setup environment for controlled integration tests with redux
This PR introduces a structured setup for testing React components, enabling controlled manipulation of Redux state for various edge case and scenario testing.
I have:
- Moved
frontend/src/setupTests.tstofrontend/vitest.setup.tsand made the appropriatetsconfig.tschanges for ESLint. - Created a
test-utils.tsxfile in the root directory that contains the render function that allows for testing with Redux - Created the
Browser.test.tsxcomponents that uses the new tools to demonstrate how we can test components