@@ -48,7 +48,7 @@ describe('encode', () => {
48
48
width : 2 ,
49
49
height : 3 ,
50
50
data : dataArray ,
51
- channels : 1 ,
51
+ components : 1 ,
52
52
alpha : false
53
53
} ) ;
54
54
expect ( data ) . toBeInstanceOf ( Uint8Array ) ;
@@ -85,7 +85,7 @@ describe('encode', () => {
85
85
height : 2 ,
86
86
bitDepth : 16 ,
87
87
data : dataArray ,
88
- channels : 3 ,
88
+ components : 3 ,
89
89
alpha : false
90
90
} ) ;
91
91
expect ( data ) . toBeInstanceOf ( Uint8Array ) ;
@@ -121,7 +121,7 @@ describe('encode', () => {
121
121
width : 2 ,
122
122
height : 3 ,
123
123
data : dataArray ,
124
- channels : 2 ,
124
+ components : 1 ,
125
125
alpha : true
126
126
} ) ;
127
127
expect ( data ) . toBeInstanceOf ( Uint8Array ) ;
@@ -145,17 +145,17 @@ describe('encode', () => {
145
145
height : 1 ,
146
146
bitDepth : 8 ,
147
147
data : new Uint8Array ( ) ,
148
- channels : 5 ,
148
+ components : 5 ,
149
149
alpha : true
150
150
} )
151
- ) . toThrow ( 'unsupported number of channels : 5' ) ;
151
+ ) . toThrow ( 'unsupported number of components : 5' ) ;
152
152
expect ( ( ) =>
153
153
encode ( {
154
154
width : 1 ,
155
155
height : 1 ,
156
156
bitDepth : 8 ,
157
157
data : new Uint8Array ( ) ,
158
- channels : 3 ,
158
+ components : 3 ,
159
159
// @ts -ignore
160
160
alpha : 2
161
161
} )
@@ -166,7 +166,7 @@ describe('encode', () => {
166
166
height : 1 ,
167
167
bitDepth : 8 ,
168
168
data : new Uint8Array ( ) ,
169
- channels : 3 ,
169
+ components : 3 ,
170
170
alpha : false
171
171
} )
172
172
) . toThrow ( 'width must be a positive integer' ) ;
@@ -177,7 +177,7 @@ describe('encode', () => {
177
177
height : undefined ,
178
178
bitDepth : 8 ,
179
179
data : new Uint8Array ( ) ,
180
- channels : 3 ,
180
+ components : 3 ,
181
181
alpha : false
182
182
} )
183
183
) . toThrow ( 'height must be a positive integer' ) ;
@@ -187,7 +187,7 @@ describe('encode', () => {
187
187
height : 1 ,
188
188
bitDepth : 8 ,
189
189
data : new Uint8Array ( 10 ) ,
190
- channels : 3 ,
190
+ components : 3 ,
191
191
alpha : false
192
192
} )
193
193
) . toThrow ( 'wrong data size. Found 10, expected 3' ) ;
@@ -197,7 +197,7 @@ describe('encode', () => {
197
197
height : 1 ,
198
198
bitDepth : 1 ,
199
199
data : new Uint8Array ( 10 ) ,
200
- channels : 3 ,
200
+ components : 3 ,
201
201
alpha : false
202
202
} )
203
203
) . toThrow ( 'unsupported bit depth: 1' ) ;
0 commit comments