mirror of
https://github.com/aleleba/create-react-component-library.git
synced 2025-07-21 03:58:17 -06:00
PR-342468: fixing test.
This commit is contained in:
@ -2,7 +2,7 @@ import React from 'react';
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import { Card } from '@components';
|
||||
|
||||
describe('<App/> Component', () => {
|
||||
describe('<Card/> Component', () => {
|
||||
beforeEach(() => {
|
||||
// fetchMock.resetMocks();
|
||||
render(<Card title='Test Title'><p>Test Content</p></Card>)
|
||||
@ -12,13 +12,13 @@ describe('<App/> Component', () => {
|
||||
//First Data Fetch
|
||||
data: 'data'
|
||||
})); */
|
||||
screen.getByText('Test Title')
|
||||
expect(screen.getByText('Test Title')).toBeInTheDocument();
|
||||
})
|
||||
it('Show Child Component', async () => {
|
||||
/* fetchMock.mockResponseOnce(JSON.stringify({
|
||||
//First Data Fetch
|
||||
data: 'data'
|
||||
})); */
|
||||
screen.getByText('Test Content')
|
||||
expect(screen.getByText('Test Content')).toBeInTheDocument();
|
||||
})
|
||||
})
|
||||
|
Reference in New Issue
Block a user