Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Naszalyi committed Nov 27, 2024
1 parent 5b7b788 commit 18d3061
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions packages/react/components/modal/test/Modal.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,9 @@ import { ModalBody } from '../index'

describe('Modal component', () => {
test('should Modal have correct initial className', () => {
const { getByTestId } = render(<Modal data-testid={'modal-id'}>Hello</Modal>)
const { getByTestId } = render(<Modal data-testid={'modal-id'} title="Hello">Hello</Modal>)
const modal = getByTestId('modal-id')
expect(modal).toHaveClass('modal')
expect(modal?.childNodes[0]).toHaveClass('modal-content')
})

test('should Modal have content', () => {
const { getByText } = render(
<Modal>
<ModalBody>{'CONTENT'}</ModalBody>
</Modal>,
)
expect(getByText('CONTENT')).toBeTruthy()
})

test('should Modal have child', () => {
const { getByText } = render(<Modal>CHILD</Modal>)
expect(getByText('CHILD')).toBeTruthy()
})
})

0 comments on commit 18d3061

Please sign in to comment.