Skip to content

Commit a56c724

Browse files
committed
migration
1 parent a204106 commit a56c724

File tree

9 files changed

+48
-164
lines changed

9 files changed

+48
-164
lines changed

front/src/components/backToTop/__tests__/BackToTop.test.js

Lines changed: 0 additions & 26 deletions
This file was deleted.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import React from 'react';
2+
import { shallow } from 'enzyme';
3+
import BackToTop from '../BackToTop';
4+
5+
describe('BackToTop component', () => {
6+
it('renders as expected', () => {
7+
const props = {
8+
minScrollY: 10,
9+
onScrollDone: jest.fn(),
10+
};
11+
12+
const wrapper = shallow(<BackToTop {...props} />);
13+
expect(wrapper).toMatchSnapshot();
14+
});
15+
});

front/src/components/backToTop/__tests__/__snapshots__/BackToTop.test.js.snap

Lines changed: 0 additions & 39 deletions
This file was deleted.

front/src/components/backToTop/backToTopButton/__tests__/BackToTopButton.test.js

Lines changed: 0 additions & 26 deletions
This file was deleted.

front/src/components/backToTop/backToTopButton/__tests__/UpIcon.test.js

Lines changed: 0 additions & 20 deletions
This file was deleted.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import React from 'react';
2+
import { shallow } from 'enzyme';
3+
import UpIcon from '../UpIcon';
4+
5+
describe('UpIcon component', () => {
6+
it('renders as expected', () => {
7+
const props = { color: '' };
8+
const component = shallow(<UpIcon {...props} />);
9+
expect(component).toMatchSnapshot();
10+
});
11+
});

front/src/components/backToTop/backToTopButton/__tests__/__snapshots__/BackToTopButton.test.js.snap

Lines changed: 0 additions & 37 deletions
This file was deleted.

front/src/components/backToTop/backToTopButton/__tests__/__snapshots__/UpIcon.test.js.snap

Lines changed: 0 additions & 16 deletions
This file was deleted.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import React from 'react';
2+
import { shallow } from 'enzyme';
3+
import BackToTopButton, { BackButtonPosition } from '../BackToTopButton';
4+
5+
describe('BackToTopButton component', () => {
6+
it('renders as expected', () => {
7+
const position: BackButtonPosition = 'bottom-left';
8+
const props = {
9+
position,
10+
onClick: () => {},
11+
motionStyle: {},
12+
};
13+
14+
const component = shallow(
15+
<BackToTopButton {...props}>
16+
<p>a child</p>
17+
</BackToTopButton>,
18+
);
19+
20+
expect(component).toMatchSnapshot();
21+
});
22+
});

0 commit comments

Comments
 (0)