OpenHands icon indicating copy to clipboard operation
OpenHands copied to clipboard

test(frontend): setup environment for controlled integration tests with redux

Open amanape opened this issue 1 year ago • 0 comments

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.ts to frontend/vitest.setup.ts and made the appropriate tsconfig.ts changes for ESLint.
  • Created a test-utils.tsx file in the root directory that contains the render function that allows for testing with Redux
  • Created the Browser.test.tsx components that uses the new tools to demonstrate how we can test components

amanape avatar Apr 17 '24 10:04 amanape