1
1
import getScroll from '../getScroll' ;
2
2
3
3
describe ( 'getScroll' , ( ) => {
4
- it ( 'getScroll target null' , async ( ) => {
4
+ it ( 'getScroll target null' , ( ) => {
5
5
expect ( getScroll ( null , true ) ) . toBe ( 0 ) ;
6
6
expect ( getScroll ( null , false ) ) . toBe ( 0 ) ;
7
7
} ) ;
8
8
9
- it ( 'getScroll window' , async ( ) => {
9
+ it ( 'getScroll window' , ( ) => {
10
10
const scrollToSpy = jest . spyOn ( window , 'scrollTo' ) . mockImplementation ( ( x , y ) => {
11
11
window . pageXOffset = x ;
12
12
window . pageYOffset = y ;
@@ -17,7 +17,7 @@ describe('getScroll', () => {
17
17
scrollToSpy . mockRestore ( ) ;
18
18
} ) ;
19
19
20
- it ( 'getScroll document' , async ( ) => {
20
+ it ( 'getScroll document' , ( ) => {
21
21
const scrollToSpy = jest . spyOn ( window , 'scrollTo' ) . mockImplementation ( ( x , y ) => {
22
22
document . documentElement . scrollLeft = x ;
23
23
document . documentElement . scrollTop = y ;
@@ -28,7 +28,7 @@ describe('getScroll', () => {
28
28
scrollToSpy . mockRestore ( ) ;
29
29
} ) ;
30
30
31
- it ( 'getScroll div' , async ( ) => {
31
+ it ( 'getScroll div' , ( ) => {
32
32
const div = document . createElement ( 'div' ) ;
33
33
const scrollToSpy = jest . spyOn ( window , 'scrollTo' ) . mockImplementation ( ( x , y ) => {
34
34
div . scrollLeft = x ;
@@ -40,7 +40,7 @@ describe('getScroll', () => {
40
40
scrollToSpy . mockRestore ( ) ;
41
41
} ) ;
42
42
43
- it ( 'getScroll documentElement' , async ( ) => {
43
+ it ( 'getScroll documentElement' , ( ) => {
44
44
const div : any = { } ;
45
45
const scrollToSpy = jest . spyOn ( window , 'scrollTo' ) . mockImplementation ( ( x , y ) => {
46
46
div . scrollLeft = null ;
0 commit comments