Skip to content

Commit

Permalink
UIIN-1681 create Jest/RTL test for IdentifierTypesSettings.js (folio-…
Browse files Browse the repository at this point in the history
…org#1863)

Refs UIIN-1681
  • Loading branch information
cchitneedi authored Nov 23, 2022
1 parent 95a84e4 commit 7c04855
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions src/settings/IdentifierTypesSettings.test.js
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();
});
});

0 comments on commit 7c04855

Please sign in to comment.