Skip to content

Commit 2f7d4d5

Browse files
committed
fix tests
1 parent d9b87d7 commit 2f7d4d5

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

src/index.test.ts

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,14 +182,28 @@ test('errors if velocityOut is a string', () => {
182182

183183
test('errors on unexpected keyframe property', () => {
184184
expect(() =>
185-
// @ts-ignore
186-
animate([{ keyTime: 0, keyValue: 0 }, { keyTime: 1, keyValue: 1 ease: 0}], 0.5)
185+
animate(
186+
[
187+
{ keyTime: 0, keyValue: 0 },
188+
// @ts-ignore
189+
{ keyTime: 1, keyValue: 1, ease: 0 },
190+
],
191+
0.5
192+
)
187193
).toThrowError('Unexpected property on keyframe 1: ease');
188194
});
189195

190196
test('errors if values are arrays of different lengths', () => {
191197
expect(() =>
192198
// @ts-ignore
193-
animate([{ keyTime: 0, keyValue: [0, 0] }, { keyTime: 1, keyValue: [1, 1, 1]}], 0.5)
194-
).toThrowError('Keyframe 0 and 1 values must be of the same dimension. Received 2 and 3');
199+
animate(
200+
[
201+
{ keyTime: 0, keyValue: [0, 0] },
202+
{ keyTime: 1, keyValue: [1, 1, 1] },
203+
],
204+
0.5
205+
)
206+
).toThrowError(
207+
'Keyframe 0 and 1 values must be of the same dimension. Received 2 and 3'
208+
);
195209
});

0 commit comments

Comments
 (0)