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