react95-native
Version:
Refreshed Windows 95 style UI components for your React Native app
24 lines • 824 B
JavaScript
import React from 'react';
import { render } from '@testing-library/react-native';
import { testId } from './Panel';
import { Panel, Text } from '../..';
describe('<Panel />', () => {
it('should render children', () => {
const {
getByTestId
} = render( /*#__PURE__*/React.createElement(Panel, null, /*#__PURE__*/React.createElement(Text, null, "Banana dance")));
expect(getByTestId(testId)).toHaveTextContent('Banana dance');
});
it('should render custom styles', () => {
const style = {
backgroundColor: 'teal'
};
const {
getByTestId
} = render( /*#__PURE__*/React.createElement(Panel, {
style: style
}, /*#__PURE__*/React.createElement(Text, null, "Panel")));
expect(getByTestId(testId)).toHaveStyle(style);
});
});
//# sourceMappingURL=Panel.spec.js.map