mirror of
https://github.com/apache/superset.git
synced 2026-04-15 14:15:15 +00:00
Improves RTL configuration (#13079)
- Adds plugin:jest-dom/recommended to ESLint plugins list to enforce tests best practices - Moves import @testing-library/jest-dom/extend-expect; from setup.ts to testing-library.tsx to avoid matchers collision - Adds @testing-library/user-event to help simulate users events
This commit is contained in:
committed by
GitHub
parent
870886ca2f
commit
86807e40b7
@@ -25,7 +25,7 @@ describe('ControlSetRow', () => {
|
||||
const { getAllByText } = render(
|
||||
<ControlSetRow controls={[<p>My Control 1</p>]} />,
|
||||
);
|
||||
expect(getAllByText('My Control 1')).toHaveLength(1);
|
||||
expect(getAllByText('My Control 1').length).toBe(1);
|
||||
});
|
||||
it('renders a single row with two elements', () => {
|
||||
const { getAllByText } = render(
|
||||
|
||||
Reference in New Issue
Block a user