Cleanup tests
This commit is contained in:
parent
6cf064eaf0
commit
bec4279c31
@ -1,6 +1,6 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`Message rendering 1`] = `
|
||||
exports[`App rendering 1`] = `
|
||||
<React.Fragment>
|
||||
<Translate(Form)
|
||||
downloadUrls={
|
||||
|
@ -3,9 +3,11 @@ import { shallow } from 'enzyme';
|
||||
|
||||
import App from 'components/App';
|
||||
|
||||
test('Message rendering', () => {
|
||||
const component = shallow(
|
||||
<App/>
|
||||
);
|
||||
expect(component).toMatchSnapshot();
|
||||
describe('App', () => {
|
||||
test('rendering', () => {
|
||||
const component = shallow(
|
||||
<App/>
|
||||
);
|
||||
expect(component).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
|
@ -3,11 +3,13 @@ import { shallow } from 'enzyme';
|
||||
|
||||
import { Footer } from 'components/Footer';
|
||||
|
||||
test('Footer rendering', () => {
|
||||
const component = shallow(
|
||||
<Footer>
|
||||
<p>Content</p>
|
||||
</Footer>
|
||||
);
|
||||
expect(component).toMatchSnapshot();
|
||||
describe('Footer', () => {
|
||||
test('rendering', () => {
|
||||
const component = shallow(
|
||||
<Footer>
|
||||
<p>Content</p>
|
||||
</Footer>
|
||||
);
|
||||
expect(component).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
|
@ -5,22 +5,24 @@ import { Header } from 'components/Header';
|
||||
|
||||
const env = { ...process.env };
|
||||
|
||||
afterEach(() => {
|
||||
process.env = env;
|
||||
});
|
||||
describe('Header', () => {
|
||||
afterEach(() => {
|
||||
process.env = env;
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
process.env = {
|
||||
...process.env,
|
||||
BANNER: 'testing'
|
||||
};
|
||||
});
|
||||
beforeEach(() => {
|
||||
process.env = {
|
||||
...process.env,
|
||||
BANNER: 'testing'
|
||||
};
|
||||
});
|
||||
|
||||
test('Header rendering', () => {
|
||||
const component = shallow(
|
||||
<Header>
|
||||
<p>Content</p>
|
||||
</Header>
|
||||
);
|
||||
expect(component).toMatchSnapshot();
|
||||
test('rendering', () => {
|
||||
const component = shallow(
|
||||
<Header>
|
||||
<p>Content</p>
|
||||
</Header>
|
||||
);
|
||||
expect(component).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
|
@ -3,30 +3,32 @@ import { shallow, render } from 'enzyme';
|
||||
|
||||
import Message from 'components/Message';
|
||||
|
||||
test('Message rendering', () => {
|
||||
const component = shallow(
|
||||
<Message heading="Testing" className="testing">
|
||||
<p>Message content</p>
|
||||
</Message>
|
||||
);
|
||||
expect(component).toMatchSnapshot();
|
||||
});
|
||||
describe('Message', () => {
|
||||
test('rendering', () => {
|
||||
const component = shallow(
|
||||
<Message heading="Testing" className="testing">
|
||||
<p>Message content</p>
|
||||
</Message>
|
||||
);
|
||||
expect(component).toMatchSnapshot();
|
||||
});
|
||||
|
||||
test('Message rendering with icon', () => {
|
||||
const Icon = () => 'Sample icon SVG';
|
||||
const component = render(
|
||||
<Message heading="Testing" icon={ Icon }>
|
||||
<p>Message content</p>
|
||||
</Message>
|
||||
);
|
||||
expect(component).toMatchSnapshot();
|
||||
});
|
||||
test('rendering with icon', () => {
|
||||
const Icon = () => 'Sample icon SVG';
|
||||
const component = render(
|
||||
<Message heading="Testing" icon={ Icon }>
|
||||
<p>Message content</p>
|
||||
</Message>
|
||||
);
|
||||
expect(component).toMatchSnapshot();
|
||||
});
|
||||
|
||||
test('Message rendering with type', () => {
|
||||
const component = render(
|
||||
<Message heading="Testing" type="error">
|
||||
<p>Message content</p>
|
||||
</Message>
|
||||
);
|
||||
expect(component).toMatchSnapshot();
|
||||
test('rendering with type', () => {
|
||||
const component = render(
|
||||
<Message heading="Testing" type="error">
|
||||
<p>Message content</p>
|
||||
</Message>
|
||||
);
|
||||
expect(component).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user