Cleanup tests

This commit is contained in:
Jeff Avallone 2018-02-13 21:38:10 -05:00
parent 6cf064eaf0
commit bec4279c31
5 changed files with 61 additions and 53 deletions

View File

@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Message rendering 1`] = `
exports[`App rendering 1`] = `
<React.Fragment>
<Translate(Form)
downloadUrls={

View File

@ -3,9 +3,11 @@ import { shallow } from 'enzyme';
import App from 'components/App';
test('Message rendering', () => {
describe('App', () => {
test('rendering', () => {
const component = shallow(
<App/>
);
expect(component).toMatchSnapshot();
});
});

View File

@ -3,7 +3,8 @@ import { shallow } from 'enzyme';
import { Footer } from 'components/Footer';
test('Footer rendering', () => {
describe('Footer', () => {
test('rendering', () => {
const component = shallow(
<Footer>
<p>Content</p>
@ -11,3 +12,4 @@ test('Footer rendering', () => {
);
expect(component).toMatchSnapshot();
});
});

View File

@ -5,6 +5,7 @@ import { Header } from 'components/Header';
const env = { ...process.env };
describe('Header', () => {
afterEach(() => {
process.env = env;
});
@ -16,7 +17,7 @@ beforeEach(() => {
};
});
test('Header rendering', () => {
test('rendering', () => {
const component = shallow(
<Header>
<p>Content</p>
@ -24,3 +25,4 @@ test('Header rendering', () => {
);
expect(component).toMatchSnapshot();
});
});

View File

@ -3,7 +3,8 @@ import { shallow, render } from 'enzyme';
import Message from 'components/Message';
test('Message rendering', () => {
describe('Message', () => {
test('rendering', () => {
const component = shallow(
<Message heading="Testing" className="testing">
<p>Message content</p>
@ -12,7 +13,7 @@ test('Message rendering', () => {
expect(component).toMatchSnapshot();
});
test('Message rendering with icon', () => {
test('rendering with icon', () => {
const Icon = () => 'Sample icon SVG';
const component = render(
<Message heading="Testing" icon={ Icon }>
@ -22,7 +23,7 @@ test('Message rendering with icon', () => {
expect(component).toMatchSnapshot();
});
test('Message rendering with type', () => {
test('rendering with type', () => {
const component = render(
<Message heading="Testing" type="error">
<p>Message content</p>
@ -30,3 +31,4 @@ test('Message rendering with type', () => {
);
expect(component).toMatchSnapshot();
});
});