@zohodesk/dot
Version:
In this Library, we Provide Some Basic Components to Build Your Application
35 lines • 992 B
JavaScript
import React from 'react';
import { render } from '@testing-library/react';
import Attachment from "../Attachment";
describe('Attachment', () => {
test('rendering the defult props', () => {
const {
asFragment
} = render( /*#__PURE__*/React.createElement(Attachment, null));
expect(asFragment()).toMatchSnapshot();
});
});
describe('Attachment with props', () => {
test('rendering the defult props', () => {
const {
asFragment
} = render( /*#__PURE__*/React.createElement(Attachment, {
onClick: jest.fn(),
dataId: "test_id",
size: "medium",
iconName: "test_icon",
fileName: "test_file",
fileSize: "10MB",
downloadLink: "http://example.com",
palette: "default",
tooltip: "test_tooltip",
fileInfo: "test_info",
i18nKeys: {
downloadTitle: 'Download'
},
dataSelectorId: "test_selector",
isDisabled: false
}));
expect(asFragment()).toMatchSnapshot();
});
});