joyent-portal/packages/normalized-styled-components/test/index.js

247 lines
5.7 KiB
JavaScript
Raw Normal View History

2017-06-16 23:46:36 +03:00
import React from 'react';
import renderer from 'react-test-renderer';
import 'jest-styled-components';
import {
Article,
Aside,
Footer,
Header,
Nav,
Section,
FigCaption,
Figure,
Main,
H1,
Hr,
Pre,
A,
Abbr,
B,
Strong,
Code,
Kbd,
Samp,
Dfn,
Mark,
Small,
Sub,
Sup,
Audio,
Video,
Img,
Svg,
Button,
Input,
Optgroup,
Select,
Textarea,
Fieldset,
Legend,
Progress,
Details,
Menu,
Summary,
Canvas
} from '../src/';
it('renders <Article /> correctly', () => {
const tree = renderer.create(<Article />).toJSON();
2017-07-26 15:50:49 +03:00
expect(tree).toMatchSnapshot();
2017-06-16 23:46:36 +03:00
});
it('renders <Aside /> correctly', () => {
const tree = renderer.create(<Aside />).toJSON();
2017-07-26 15:50:49 +03:00
expect(tree).toMatchSnapshot();
2017-06-16 23:46:36 +03:00
});
it('renders <Footer /> correctly', () => {
const tree = renderer.create(<Footer />).toJSON();
2017-07-26 15:50:49 +03:00
expect(tree).toMatchSnapshot();
2017-06-16 23:46:36 +03:00
});
it('renders <Header /> correctly', () => {
const tree = renderer.create(<Header />).toJSON();
2017-07-26 15:50:49 +03:00
expect(tree).toMatchSnapshot();
2017-06-16 23:46:36 +03:00
});
it('renders <Nav /> correctly', () => {
const tree = renderer.create(<Nav />).toJSON();
2017-07-26 15:50:49 +03:00
expect(tree).toMatchSnapshot();
2017-06-16 23:46:36 +03:00
});
it('renders <Section /> correctly', () => {
const tree = renderer.create(<Section />).toJSON();
2017-07-26 15:50:49 +03:00
expect(tree).toMatchSnapshot();
2017-06-16 23:46:36 +03:00
});
it('renders <FigCaption /> correctly', () => {
const tree = renderer.create(<FigCaption />).toJSON();
2017-07-26 15:50:49 +03:00
expect(tree).toMatchSnapshot();
2017-06-16 23:46:36 +03:00
});
it('renders <Figure /> correctly', () => {
const tree = renderer.create(<Figure />).toJSON();
2017-07-26 15:50:49 +03:00
expect(tree).toMatchSnapshot();
2017-06-16 23:46:36 +03:00
});
it('renders <Main /> correctly', () => {
const tree = renderer.create(<Main />).toJSON();
2017-07-26 15:50:49 +03:00
expect(tree).toMatchSnapshot();
2017-06-16 23:46:36 +03:00
});
it('renders <H1 /> correctly', () => {
const tree = renderer.create(<H1 />).toJSON();
2017-07-26 15:50:49 +03:00
expect(tree).toMatchSnapshot();
2017-06-16 23:46:36 +03:00
});
it('renders <Hr /> correctly', () => {
const tree = renderer.create(<Hr />).toJSON();
2017-07-26 15:50:49 +03:00
expect(tree).toMatchSnapshot();
2017-06-16 23:46:36 +03:00
});
it('renders <Pre /> correctly', () => {
const tree = renderer.create(<Pre />).toJSON();
2017-07-26 15:50:49 +03:00
expect(tree).toMatchSnapshot();
2017-06-16 23:46:36 +03:00
});
it('renders <A /> correctly', () => {
const tree = renderer.create(<A />).toJSON();
2017-07-26 15:50:49 +03:00
expect(tree).toMatchSnapshot();
2017-06-16 23:46:36 +03:00
});
it('renders <Abbr /> correctly', () => {
const tree = renderer.create(<Abbr />).toJSON();
2017-07-26 15:50:49 +03:00
expect(tree).toMatchSnapshot();
2017-06-16 23:46:36 +03:00
});
it('renders <B /> correctly', () => {
const tree = renderer.create(<B />).toJSON();
2017-07-26 15:50:49 +03:00
expect(tree).toMatchSnapshot();
2017-06-16 23:46:36 +03:00
});
it('renders <Strong /> correctly', () => {
const tree = renderer.create(<Strong />).toJSON();
2017-07-26 15:50:49 +03:00
expect(tree).toMatchSnapshot();
2017-06-16 23:46:36 +03:00
});
it('renders <Code /> correctly', () => {
const tree = renderer.create(<Code />).toJSON();
2017-07-26 15:50:49 +03:00
expect(tree).toMatchSnapshot();
2017-06-16 23:46:36 +03:00
});
it('renders <Kbd /> correctly', () => {
const tree = renderer.create(<Kbd />).toJSON();
2017-07-26 15:50:49 +03:00
expect(tree).toMatchSnapshot();
2017-06-16 23:46:36 +03:00
});
it('renders <Samp /> correctly', () => {
const tree = renderer.create(<Samp />).toJSON();
2017-07-26 15:50:49 +03:00
expect(tree).toMatchSnapshot();
2017-06-16 23:46:36 +03:00
});
it('renders <Dfn /> correctly', () => {
const tree = renderer.create(<Dfn />).toJSON();
2017-07-26 15:50:49 +03:00
expect(tree).toMatchSnapshot();
2017-06-16 23:46:36 +03:00
});
it('renders <Mark /> correctly', () => {
const tree = renderer.create(<Mark />).toJSON();
2017-07-26 15:50:49 +03:00
expect(tree).toMatchSnapshot();
2017-06-16 23:46:36 +03:00
});
it('renders <Small /> correctly', () => {
const tree = renderer.create(<Small />).toJSON();
2017-07-26 15:50:49 +03:00
expect(tree).toMatchSnapshot();
2017-06-16 23:46:36 +03:00
});
it('renders <Sub /> correctly', () => {
const tree = renderer.create(<Sub />).toJSON();
2017-07-26 15:50:49 +03:00
expect(tree).toMatchSnapshot();
2017-06-16 23:46:36 +03:00
});
it('renders <Sup /> correctly', () => {
const tree = renderer.create(<Sup />).toJSON();
2017-07-26 15:50:49 +03:00
expect(tree).toMatchSnapshot();
2017-06-16 23:46:36 +03:00
});
it('renders <Audio /> correctly', () => {
const tree = renderer.create(<Audio />).toJSON();
2017-07-26 15:50:49 +03:00
expect(tree).toMatchSnapshot();
2017-06-16 23:46:36 +03:00
});
it('renders <Video /> correctly', () => {
const tree = renderer.create(<Video />).toJSON();
2017-07-26 15:50:49 +03:00
expect(tree).toMatchSnapshot();
2017-06-16 23:46:36 +03:00
});
it('renders <Img /> correctly', () => {
const tree = renderer.create(<Img />).toJSON();
2017-07-26 15:50:49 +03:00
expect(tree).toMatchSnapshot();
2017-06-16 23:46:36 +03:00
});
it('renders <Svg /> correctly', () => {
const tree = renderer.create(<Svg />).toJSON();
2017-07-26 15:50:49 +03:00
expect(tree).toMatchSnapshot();
2017-06-16 23:46:36 +03:00
});
it('renders <Button /> correctly', () => {
const tree = renderer.create(<Button />).toJSON();
2017-07-26 15:50:49 +03:00
expect(tree).toMatchSnapshot();
2017-06-16 23:46:36 +03:00
});
it('renders <Input /> correctly', () => {
const tree = renderer.create(<Input />).toJSON();
2017-07-26 15:50:49 +03:00
expect(tree).toMatchSnapshot();
2017-06-16 23:46:36 +03:00
});
it('renders <Optgroup /> correctly', () => {
const tree = renderer.create(<Optgroup />).toJSON();
2017-07-26 15:50:49 +03:00
expect(tree).toMatchSnapshot();
2017-06-16 23:46:36 +03:00
});
it('renders <Select /> correctly', () => {
const tree = renderer.create(<Select />).toJSON();
2017-07-26 15:50:49 +03:00
expect(tree).toMatchSnapshot();
2017-06-16 23:46:36 +03:00
});
it('renders <Textarea /> correctly', () => {
const tree = renderer.create(<Textarea />).toJSON();
2017-07-26 15:50:49 +03:00
expect(tree).toMatchSnapshot();
2017-06-16 23:46:36 +03:00
});
it('renders <Fieldset /> correctly', () => {
const tree = renderer.create(<Fieldset />).toJSON();
2017-07-26 15:50:49 +03:00
expect(tree).toMatchSnapshot();
2017-06-16 23:46:36 +03:00
});
it('renders <Legend /> correctly', () => {
const tree = renderer.create(<Legend />).toJSON();
2017-07-26 15:50:49 +03:00
expect(tree).toMatchSnapshot();
2017-06-16 23:46:36 +03:00
});
it('renders <Progress /> correctly', () => {
const tree = renderer.create(<Progress />).toJSON();
2017-07-26 15:50:49 +03:00
expect(tree).toMatchSnapshot();
2017-06-16 23:46:36 +03:00
});
it('renders <Details /> correctly', () => {
const tree = renderer.create(<Details />).toJSON();
2017-07-26 15:50:49 +03:00
expect(tree).toMatchSnapshot();
2017-06-16 23:46:36 +03:00
});
it('renders <Menu /> correctly', () => {
const tree = renderer.create(<Menu />).toJSON();
2017-07-26 15:50:49 +03:00
expect(tree).toMatchSnapshot();
2017-06-16 23:46:36 +03:00
});
it('renders <Summary /> correctly', () => {
const tree = renderer.create(<Summary />).toJSON();
2017-07-26 15:50:49 +03:00
expect(tree).toMatchSnapshot();
2017-06-16 23:46:36 +03:00
});
it('renders <Canvas /> correctly', () => {
const tree = renderer.create(<Canvas />).toJSON();
2017-07-26 15:50:49 +03:00
expect(tree).toMatchSnapshot();
2017-06-16 23:46:36 +03:00
});