Skip to content

Commit a3077e4

Browse files
test: rm unnecessary async (ant-design#48033)
* chore: rm unnecessary React.useMemo * Revert "chore: reset commit" This reverts commit 2fa5df5. * test: rm unnecessary async
1 parent e17cd4a commit a3077e4

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

components/_util/__tests__/getScroll.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import getScroll from '../getScroll';
22

33
describe('getScroll', () => {
4-
it('getScroll target null', async () => {
4+
it('getScroll target null', () => {
55
expect(getScroll(null, true)).toBe(0);
66
expect(getScroll(null, false)).toBe(0);
77
});
88

9-
it('getScroll window', async () => {
9+
it('getScroll window', () => {
1010
const scrollToSpy = jest.spyOn(window, 'scrollTo').mockImplementation((x, y) => {
1111
window.pageXOffset = x;
1212
window.pageYOffset = y;
@@ -17,7 +17,7 @@ describe('getScroll', () => {
1717
scrollToSpy.mockRestore();
1818
});
1919

20-
it('getScroll document', async () => {
20+
it('getScroll document', () => {
2121
const scrollToSpy = jest.spyOn(window, 'scrollTo').mockImplementation((x, y) => {
2222
document.documentElement.scrollLeft = x;
2323
document.documentElement.scrollTop = y;
@@ -28,7 +28,7 @@ describe('getScroll', () => {
2828
scrollToSpy.mockRestore();
2929
});
3030

31-
it('getScroll div', async () => {
31+
it('getScroll div', () => {
3232
const div = document.createElement('div');
3333
const scrollToSpy = jest.spyOn(window, 'scrollTo').mockImplementation((x, y) => {
3434
div.scrollLeft = x;
@@ -40,7 +40,7 @@ describe('getScroll', () => {
4040
scrollToSpy.mockRestore();
4141
});
4242

43-
it('getScroll documentElement', async () => {
43+
it('getScroll documentElement', () => {
4444
const div: any = {};
4545
const scrollToSpy = jest.spyOn(window, 'scrollTo').mockImplementation((x, y) => {
4646
div.scrollLeft = null;

components/drawer/__tests__/Drawer.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ describe('Drawer', () => {
244244
errorSpy.mockRestore();
245245
});
246246

247-
it('should hide close button when closeIcon is null or false', async () => {
247+
it('should hide close button when closeIcon is null or false', () => {
248248
const { baseElement, rerender } = render(
249249
<Drawer open closeIcon={null}>
250250
Here is content of Drawer
@@ -311,7 +311,7 @@ describe('Drawer', () => {
311311
expect(baseElement.querySelector('.anticon-close')).not.toBeNull();
312312
});
313313

314-
it('match between styles and deprecated style prop', async () => {
314+
it('match between styles and deprecated style prop', () => {
315315
const initialFontSize = 10;
316316
let fontSize1 = initialFontSize;
317317
let fontSize2 = initialFontSize;

0 commit comments

Comments
 (0)