forked from folio-org/ui-inventory
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
UIIN-1681 create Jest/RTL test for IdentifierTypesSettings.js (folio-…
…org#1863) Refs UIIN-1681
- Loading branch information
1 parent
95a84e4
commit 7c04855
Showing
1 changed file
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import React from 'react'; | ||
import { MemoryRouter } from 'react-router-dom'; | ||
|
||
import '../../test/jest/__mock__'; | ||
|
||
import { | ||
renderWithIntl, | ||
stripesStub, | ||
translationsProperties | ||
} from '../../test/jest/helpers'; | ||
|
||
import IdentifierTypesSettings from './IdentifierTypesSettings'; | ||
|
||
const defaultProps = { | ||
stripes: { | ||
...stripesStub, | ||
connect: component => component, | ||
}, | ||
}; | ||
|
||
const IdentifierTypesSettingsSetup = () => ( | ||
<MemoryRouter> | ||
<IdentifierTypesSettings {...defaultProps} /> | ||
</MemoryRouter> | ||
); | ||
|
||
const renderIdentifierTypesSettings = () => renderWithIntl( | ||
<IdentifierTypesSettingsSetup />, | ||
translationsProperties | ||
); | ||
|
||
describe('IdentifierTypesSettings', () => { | ||
it('should render properly', () => { | ||
const { getByText } = renderIdentifierTypesSettings(); | ||
expect(getByText('ControlledVocab')).toBeInTheDocument(); | ||
}); | ||
}); |