1
- import { rotate } from '..' ;
2
-
3
1
const image = testUtils . createGreyImage ( `
4
2
1 2 3
5
3
4 5 6
6
4
` ) ;
7
5
8
6
test ( 'rotate by 90 degrees' , ( ) => {
9
- const rotated = rotate ( image , 90 ) ;
7
+ const rotated = image . rotate ( 90 ) ;
10
8
11
9
expect ( rotated ) . toMatchImageData ( `
12
10
4 1
@@ -16,7 +14,7 @@ test('rotate by 90 degrees', () => {
16
14
} ) ;
17
15
18
16
test ( 'rotate by 180 degrees' , ( ) => {
19
- const rotated = rotate ( image , 180 ) ;
17
+ const rotated = image . rotate ( 180 ) ;
20
18
21
19
expect ( rotated ) . toMatchImageData ( `
22
20
6 5 4
@@ -25,7 +23,7 @@ test('rotate by 180 degrees', () => {
25
23
} ) ;
26
24
27
25
test ( 'rotate by 270 degrees' , ( ) => {
28
- const rotated = rotate ( image , 270 ) ;
26
+ const rotated = image . rotate ( 270 ) ;
29
27
30
28
expect ( rotated ) . toMatchImageData ( `
31
29
3 6
@@ -40,7 +38,7 @@ test('with an rgb image', () => {
40
38
7 8 9 | 10 11 12
41
39
` ) ;
42
40
43
- const rotated = rotate ( image , 90 ) ;
41
+ const rotated = image . rotate ( 90 ) ;
44
42
45
43
expect ( rotated ) . toMatchImageData ( `
46
44
7 8 9 | 1 2 3
0 commit comments