Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/src/examples/RuntimeTests/RuntimeTestsExample.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import './tests/animations/withTiming/easingSnapshots.test';
import './tests/animations/withTiming/basic.test';
import './tests/animations/withTiming/colors.test';
import './tests/animations/withTiming/arrays.test';
import './tests/animations/withTiming/enteringColorsSnapshots.test';

export default function RuntimeTestsExample() {
return <RuntimeTestsRunner />;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const AnimatedComponent = ({ easing }: { easing: EasingFunction | EasingFunction
);
};

async function getSnaphotUpdates(easingFn: EasingFunction | EasingFunctionFactory | undefined) {
async function getSnapshotUpdates(easingFn: EasingFunction | EasingFunctionFactory | undefined) {
await mockAnimationTimer();
const updatesContainer = await recordAnimationUpdates();
await render(<AnimatedComponent easing={easingFn} />);
Expand All @@ -54,7 +54,7 @@ async function getSnaphotUpdates(easingFn: EasingFunction | EasingFunctionFactor

describe('withTiming snapshots 📸, test EASING', () => {
test('No easing function', async () => {
const [updates, nativeUpdates] = await getSnaphotUpdates(undefined);
const [updates, nativeUpdates] = await getSnapshotUpdates(undefined);
expect(updates).toMatchSnapshots(Snapshots.noEasing);
expect(updates).toMatchNativeSnapshots(nativeUpdates, true);
});
Expand All @@ -79,7 +79,7 @@ describe('withTiming snapshots 📸, test EASING', () => {
.replace(/\./g, '$')
.replace(/-/g, '$')}`;

const [updates, nativeUpdates] = await getSnaphotUpdates(
const [updates, nativeUpdates] = await getSnapshotUpdates(
//@ts-ignore This error is because various easing functions accept different number of arguments
easing(...argumentSet),
);
Expand All @@ -97,13 +97,13 @@ describe('withTiming snapshots 📸, test EASING', () => {
Easing.quad,
Easing.sin,
])('Easing.%p', async easing => {
const [updates, nativeUpdates] = await getSnaphotUpdates(easing);
const [updates, nativeUpdates] = await getSnapshotUpdates(easing);
expect(updates).toMatchSnapshots(Snapshots[easing.name as keyof typeof Snapshots]);
expect(updates).toMatchNativeSnapshots(nativeUpdates, true);
});

test.each([(Easing.in, Easing.out, Easing.inOut)])('Easing.%p(Easing.elastic(10))', async easing => {
const [updates, nativeUpdates] = await getSnaphotUpdates(easing(Easing.elastic(10)));
const [updates, nativeUpdates] = await getSnapshotUpdates(easing(Easing.elastic(10)));
expect(updates).toMatchSnapshots(Snapshots[easing.name as keyof typeof Snapshots]);
expect(updates).toMatchNativeSnapshots(nativeUpdates, true);
});
Expand Down
Loading