{"library":"reakit-test-utils","title":"Reakit Test Utilities","description":"The `reakit-test-utils` package provides a set of utilities designed to facilitate testing of components built with the Reakit library, primarily using `@testing-library/react` and `@testing-library/react-hooks`. While the current version is 0.15.2, active development for the Reakit ecosystem has transitioned to the Ariakit project, with `reakit-test-utils` being effectively superseded by `@ariakit/test`. This package integrates with standard testing-library APIs to enable robust, accessibility-focused testing of UI components, emphasizing user interactions over internal implementation details. Developers should note that this specific package is no longer actively maintained under the `reakit-test-utils` name, and new projects or migrations should consider using `@ariakit/test` for ongoing support and features. Its original release cadence was irregular, marked by an 'experimental' status, leading to potential breaking changes even in minor versions before the migration to Ariakit.","language":"javascript","status":"renamed","last_verified":"Wed Apr 22","install":{"commands":["npm install reakit-test-utils"],"cli":null},"imports":["import { render } from 'reakit-test-utils'","import { fireEvent } from 'reakit-test-utils'","import { act } from 'reakit-test-utils'"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import * as React from 'react';\nimport { render, fireEvent, act } from 'reakit-test-utils';\n// You would also need @testing-library/jest-dom for toBeInTheDocument\n// import '@testing-library/jest-dom'; \n\nconst Counter = () => {\n  const [count, setCount] = React.useState(0);\n  return (\n    <div>\n      <button onClick={() => setCount(c => c + 1)}>Increment</button>\n      <p>Count: {count}</p>\n    </div>\n  );\n};\n\ndescribe('Counter Component', () => {\n  it('should increment the count when button is clicked', async () => {\n    const { getByText } = render(<Counter />);\n\n    const incrementButton = getByText('Increment');\n    const countDisplay = getByText('Count: 0');\n\n    expect(countDisplay).toBeInTheDocument();\n\n    await act(async () => {\n      fireEvent.click(incrementButton);\n    });\n\n    expect(getByText('Count: 1')).toBeInTheDocument();\n  });\n});","lang":"typescript","description":"Demonstrates rendering a simple React component and interacting with it using `fireEvent` and `act` to test state changes, typical for UI component testing. This example assumes a Jest and `@testing-library/jest-dom` setup.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}