Apply prettier formatting
This commit is contained in:
parent
1cac306093
commit
526645c791
1576 changed files with 65385 additions and 62478 deletions
|
@ -12,35 +12,42 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { renderIntoDocument } from 'react-dom/test-utils';
|
||||
import React from "react";
|
||||
import { renderIntoDocument } from "react-dom/test-utils";
|
||||
|
||||
import SettingsFieldset from '../../../../src/components/views/settings/SettingsFieldset';
|
||||
import SettingsFieldset from "../../../../src/components/views/settings/SettingsFieldset";
|
||||
|
||||
describe('<SettingsFieldset />', () => {
|
||||
describe("<SettingsFieldset />", () => {
|
||||
const defaultProps = {
|
||||
"legend": 'Who can read history?',
|
||||
"legend": "Who can read history?",
|
||||
"children": <div>test</div>,
|
||||
'data-test-id': 'test',
|
||||
"data-test-id": "test",
|
||||
};
|
||||
const getComponent = (props = {}) => {
|
||||
const wrapper = renderIntoDocument<HTMLDivElement>(
|
||||
<div><SettingsFieldset {...defaultProps} {...props} /></div>,
|
||||
<div>
|
||||
<SettingsFieldset {...defaultProps} {...props} />
|
||||
</div>,
|
||||
) as HTMLDivElement;
|
||||
return wrapper.children[0];
|
||||
};
|
||||
|
||||
it('renders fieldset without description', () => {
|
||||
it("renders fieldset without description", () => {
|
||||
expect(getComponent()).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it('renders fieldset with plain text description', () => {
|
||||
const description = 'Changes to who can read history.';
|
||||
it("renders fieldset with plain text description", () => {
|
||||
const description = "Changes to who can read history.";
|
||||
expect(getComponent({ description })).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it('renders fieldset with react description', () => {
|
||||
const description = <><p>Test</p><a href='#test'>a link</a></>;
|
||||
it("renders fieldset with react description", () => {
|
||||
const description = (
|
||||
<>
|
||||
<p>Test</p>
|
||||
<a href="#test">a link</a>
|
||||
</>
|
||||
);
|
||||
expect(getComponent({ description })).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue