mirror of
https://gitlab.nic.cz/turris/reforis/foris-js.git
synced 2025-06-16 13:46:16 +02:00
Don't use default exports.
This commit is contained in:
@ -5,31 +5,41 @@
|
||||
* See /LICENSE for more information.
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import React from "react";
|
||||
|
||||
import {render} from 'customTestRender';
|
||||
import { render } from "customTestRender";
|
||||
|
||||
import RadioSet from '../RadioSet';
|
||||
import { RadioSet } from "../RadioSet";
|
||||
|
||||
const TEST_CHOICES = [
|
||||
{label: 'label', value: 'value'},
|
||||
{label: 'another label', value: 'another value'},
|
||||
{label: 'another one label', value: 'another on value'}
|
||||
{
|
||||
label: "label",
|
||||
value: "value"
|
||||
},
|
||||
{
|
||||
label: "another label",
|
||||
value: "another value"
|
||||
},
|
||||
{
|
||||
label: "another one label",
|
||||
value: "another on value"
|
||||
}
|
||||
];
|
||||
|
||||
describe('<RadioSet/>', () => {
|
||||
it('Render radio set', () => {
|
||||
const {container} = render(
|
||||
describe("<RadioSet/>", () => {
|
||||
it("Render radio set", () => {
|
||||
const { container } = render(
|
||||
<RadioSet
|
||||
name={'test_name'}
|
||||
name={"test_name"}
|
||||
label='Radios set label'
|
||||
value='value'
|
||||
choices={TEST_CHOICES}
|
||||
helpText={'Some help text'}
|
||||
helpText={"Some help text"}
|
||||
onChange={() => {
|
||||
}}
|
||||
/>
|
||||
);
|
||||
expect(container.firstChild).toMatchSnapshot();
|
||||
expect(container.firstChild)
|
||||
.toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user