Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename ReJest main folder #6292

Merged
merged 4 commits into from
Jul 18, 2024
Merged
Show file tree
Hide file tree
Changes from 3 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
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import RuntimeTestsRunner from './ReanimatedRuntimeTestsRunner/RuntimeTestsRunner';
import { describe } from './ReanimatedRuntimeTestsRunner/RuntimeTestsApi';
import RuntimeTestsRunner from './ReJest/RuntimeTestsRunner';
import { describe } from './ReJest/RuntimeTestsApi';

export default function RuntimeTestsExample() {
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ import {
notify,
waitForNotify,
clearRenderOutput,
} from '../ReanimatedRuntimeTestsRunner/RuntimeTestsApi';
} from '../ReJest/RuntimeTestsApi';
import { Snapshots } from './TestsOfTestingFramework.snapshot';
import { ComparisonMode } from '../ReanimatedRuntimeTestsRunner/types';
import { ComparisonMode } from '../ReJest/types';

const AnimatedComponent = () => {
const widthSV = useSharedValue(0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,8 @@ import Animated, {
Easing,
useFrameCallback,
} from 'react-native-reanimated';
import {
describe,
expect,
test,
render,
wait,
registerValue,
getRegisteredValue,
} from '../../ReanimatedRuntimeTestsRunner/RuntimeTestsApi';
import { ComparisonMode } from '../../ReanimatedRuntimeTestsRunner/types';
import { describe, expect, test, render, wait, registerValue, getRegisteredValue } from '../../ReJest/RuntimeTestsApi';
import { ComparisonMode } from '../../ReJest/types';

describe('Test measuring component before nad after animation', () => {
const INITIAL_MEASURE = 'INITIAL_MEASURE';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
import React, { useEffect } from 'react';
import { View, StyleSheet } from 'react-native';
import Animated, { useSharedValue, useAnimatedStyle, useFrameCallback } from 'react-native-reanimated';
import {
describe,
test,
expect,
render,
getTestComponent,
wait,
useTestRef,
} from '../../ReanimatedRuntimeTestsRunner/RuntimeTestsApi';
import { describe, test, expect, render, getTestComponent, wait, useTestRef } from '../../ReJest/RuntimeTestsApi';

describe('Test *****useFrameCallback*****', () => {
describe('Test _canceling frameCallback_ after predefined time', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
recordAnimationUpdates,
unmockAnimationTimer,
expect,
} from '../../../ReanimatedRuntimeTestsRunner/RuntimeTestsApi';
} from '../../../ReJest/RuntimeTestsApi';
import { Snapshots } from './basic.snapshot';

describe('withDecay animation, test various config', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
unmockAnimationTimer,
expect,
clearRenderOutput,
} from '../../../ReanimatedRuntimeTestsRunner/RuntimeTestsApi';
} from '../../../ReJest/RuntimeTestsApi';

const WIDTH_COMPONENT_ACTIVE_REF = 'WidthComponentActive';
const WIDTH_COMPONENT_PASSIVE_REF = 'WidthComponentPassive';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import {
unmockAnimationTimer,
mockAnimationTimer,
clearRenderOutput,
} from '../../../ReanimatedRuntimeTestsRunner/RuntimeTestsApi';
import type { SingleViewSnapshot } from '../../../ReanimatedRuntimeTestsRunner/matchers/snapshotMatchers';
} from '../../../ReJest/RuntimeTestsApi';
import type { SingleViewSnapshot } from '../../../ReJest/matchers/snapshotMatchers';

enum TestAnimation {
TIMING = 'withTiming',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,9 @@ import Animated, {
Easing,
withDelay,
} from 'react-native-reanimated';
import {
describe,
test,
render,
wait,
useTestRef,
getTestComponent,
expect,
} from '../../../ReanimatedRuntimeTestsRunner/RuntimeTestsApi';
import { describe, test, render, wait, useTestRef, getTestComponent, expect } from '../../../ReJest/RuntimeTestsApi';
import { View, StyleSheet } from 'react-native';
import { ComparisonMode } from '../../../ReanimatedRuntimeTestsRunner/types';
import { ComparisonMode } from '../../../ReJest/types';

type TestCase = {
startValues: [number, number, number];
Expand All @@ -27,7 +19,7 @@ type TestCase = {
animationNumber: number;
};

describe('withSequence animation of number', () => {
describe('withSequence animation of array', () => {
const COMPONENT_REF = {
first: 'firstComponent',
second: 'secondComponent',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
recordAnimationUpdates,
getRegisteredValue,
registerValue,
} from '../../../ReanimatedRuntimeTestsRunner/RuntimeTestsApi';
} from '../../../ReJest/RuntimeTestsApi';
import { Snapshots } from './snapshots.snapshot';

describe(`Cascade of callbacks`, () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,8 @@
import React, { useEffect } from 'react';
import { View, StyleSheet } from 'react-native';
import Animated, { useSharedValue, withSequence, cancelAnimation, withTiming } from 'react-native-reanimated';
import {
describe,
test,
expect,
render,
wait,
getTestComponent,
useTestRef,
} from '../../../ReanimatedRuntimeTestsRunner/RuntimeTestsApi';
import { ComparisonMode } from '../../../ReanimatedRuntimeTestsRunner/types';
import { describe, test, expect, render, wait, getTestComponent, useTestRef } from '../../../ReJest/RuntimeTestsApi';
import { ComparisonMode } from '../../../ReJest/types';

describe(`Test cancelling animation `, () => {
const COMPONENT_REF = 'COMPONENT_REF';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,17 @@ import Animated, {
withSequence,
withDelay,
} from 'react-native-reanimated';
import {
describe,
test,
render,
wait,
useTestRef,
getTestComponent,
expect,
} from '../../../ReanimatedRuntimeTestsRunner/RuntimeTestsApi';
import { describe, test, render, wait, useTestRef, getTestComponent, expect } from '../../../ReJest/RuntimeTestsApi';
import { View, StyleSheet } from 'react-native';
import { ComparisonMode } from '../../../ReanimatedRuntimeTestsRunner/types';
import { ComparisonMode } from '../../../ReJest/types';

type TestCase = {
startColor: string;
middleColor: string;
finalColor: string;
};

describe('withSequence animation of number', () => {
describe('withSequence animation of color', () => {
enum Component {
ACTIVE = 'ACTIVE',
PASSIVE = 'PASSIVE',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,9 @@ import Animated, {
Easing,
withDelay,
} from 'react-native-reanimated';
import {
describe,
test,
render,
wait,
useTestRef,
getTestComponent,
expect,
} from '../../../ReanimatedRuntimeTestsRunner/RuntimeTestsApi';
import { describe, test, render, wait, useTestRef, getTestComponent, expect } from '../../../ReJest/RuntimeTestsApi';
import { View, StyleSheet } from 'react-native';
import { ComparisonMode } from '../../../ReanimatedRuntimeTestsRunner/types';
import { ComparisonMode } from '../../../ReJest/types';

type TestCase = {
startValue: number;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
recordAnimationUpdates,
render,
wait,
} from '../../../ReanimatedRuntimeTestsRunner/RuntimeTestsApi';
} from '../../../ReJest/RuntimeTestsApi';
import { Snapshots } from './withSpring.snapshot';

const AnimatedComponent = ({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,8 @@
import React, { useEffect } from 'react';
import { View, StyleSheet } from 'react-native';
import Animated, { useSharedValue, useAnimatedStyle, withTiming, withDelay } from 'react-native-reanimated';
import { ComparisonMode } from '../../../ReanimatedRuntimeTestsRunner/types';
import {
describe,
test,
expect,
render,
useTestRef,
getTestComponent,
wait,
} from '../../../ReanimatedRuntimeTestsRunner/RuntimeTestsApi';
import { ComparisonMode } from '../../../ReJest/types';
import { describe, test, expect, render, useTestRef, getTestComponent, wait } from '../../../ReJest/RuntimeTestsApi';

const COMPONENT_REF = {
first: 'firstComponent',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useEffect } from 'react';
import { View, StyleSheet, Dimensions } from 'react-native';
import Animated, { useSharedValue, useAnimatedStyle, withTiming, withDelay } from 'react-native-reanimated';
import { ComparisonMode } from '../../../ReanimatedRuntimeTestsRunner/types';
import { ComparisonMode } from '../../../ReJest/types';
import {
describe,
test,
Expand All @@ -13,7 +13,7 @@ import {
callTracker,
callTrackerFn,
getTrackerCallCount,
} from '../../../ReanimatedRuntimeTestsRunner/RuntimeTestsApi';
} from '../../../ReJest/RuntimeTestsApi';

enum Tracker {
UseAnimatedStyle = 'useAnimatedStyleTracker',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,8 @@
import React, { useEffect } from 'react';
import { View, StyleSheet } from 'react-native';
import Animated, { useSharedValue, useAnimatedStyle, withTiming, withDelay } from 'react-native-reanimated';
import { ComparisonMode } from '../../../ReanimatedRuntimeTestsRunner/types';
import {
describe,
test,
expect,
render,
useTestRef,
getTestComponent,
wait,
} from '../../../ReanimatedRuntimeTestsRunner/RuntimeTestsApi';
import { ComparisonMode } from '../../../ReJest/types';
import { describe, test, expect, render, useTestRef, getTestComponent, wait } from '../../../ReJest/RuntimeTestsApi';

const COMPONENT_REF_ACTIVE = 'ColorComponentPassive';
const COMPONENT_REF_PASSIVE = 'ColorComponentPassive';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import {
render,
wait,
unmockAnimationTimer,
} from '../../../ReanimatedRuntimeTestsRunner/RuntimeTestsApi';
} from '../../../ReJest/RuntimeTestsApi';
import { EasingSnapshots } from './withTiming.snapshot';
import { ErrorBoundary } from '../../../ReanimatedRuntimeTestsRunner/RuntimeTestsRunner';
import { ErrorBoundary } from '../../../ReJest/RuntimeTestsRunner';

const ActiveAnimatedComponent = ({ easing }: { easing: EasingFunction | EasingFunctionFactory | undefined }) => {
const widthSV = useSharedValue(0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,9 @@ import React, { useEffect } from 'react';
import { View, StyleSheet } from 'react-native';
import type { AnimatableValueObject } from 'react-native-reanimated';
import Animated, { useSharedValue, useAnimatedStyle, withTiming, withDelay } from 'react-native-reanimated';
import type { ValidPropNames } from '../../../ReanimatedRuntimeTestsRunner/types';
import {
describe,
test,
expect,
render,
useTestRef,
getTestComponent,
wait,
} from '../../../ReanimatedRuntimeTestsRunner/RuntimeTestsApi';
import { getComparisonModeForProp } from '../../../ReanimatedRuntimeTestsRunner/matchers/Comparators';
import type { ValidPropNames } from '../../../ReJest/types';
import { describe, test, expect, render, useTestRef, getTestComponent, wait } from '../../../ReJest/RuntimeTestsApi';
import { getComparisonModeForProp } from '../../../ReJest/matchers/Comparators';

const COMPONENT_REF = 'AnimatedComponent';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
recordAnimationUpdates,
render,
wait,
} from '../../../ReanimatedRuntimeTestsRunner/RuntimeTestsApi';
} from '../../../ReJest/RuntimeTestsApi';
import { MatrixSnapshots } from './withTiming.snapshot';

const AnimatedComponent = ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
useTestRef,
registerValue,
getRegisteredValue,
} from '../../ReanimatedRuntimeTestsRunner/RuntimeTestsApi';
} from '../../ReJest/RuntimeTestsApi';

const ELAPSED_TIME_REF = 'ElapsedTime';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,9 @@ import React, { useEffect } from 'react';
import { View, StyleSheet } from 'react-native';
import type { AnimatableValueObject } from 'react-native-reanimated';
import Animated, { useSharedValue, useAnimatedStyle, withTiming } from 'react-native-reanimated';
import { ComparisonMode } from '../../../ReanimatedRuntimeTestsRunner/types';
import {
describe,
test,
expect,
render,
useTestRef,
getTestComponent,
wait,
} from '../../../ReanimatedRuntimeTestsRunner/RuntimeTestsApi';
import { getComparisonModeForProp } from '../../../ReanimatedRuntimeTestsRunner/matchers/Comparators';
import { ComparisonMode } from '../../../ReJest/types';
import { describe, test, expect, render, useTestRef, getTestComponent, wait } from '../../../ReJest/RuntimeTestsApi';
import { getComparisonModeForProp } from '../../../ReJest/matchers/Comparators';

describe('Test reusing animatedStyles', () => {
const COMPONENT_REF = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import Animated, {
useDerivedValue,
withSpring,
} from 'react-native-reanimated';
import { ComparisonMode } from '../../../ReanimatedRuntimeTestsRunner/types';
import { ComparisonMode } from '../../../ReJest/types';
import {
describe,
test,
Expand All @@ -19,7 +19,7 @@ import {
recordAnimationUpdates,
mockAnimationTimer,
unmockAnimationTimer,
} from '../../../ReanimatedRuntimeTestsRunner/RuntimeTestsApi';
} from '../../../ReJest/RuntimeTestsApi';
import { BasicSnapshots } from './useDerivedValue.snapshot';

const WIDTH_COMPONENT = 'WidthComponent';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,8 @@
import React, { useEffect } from 'react';
import { View, StyleSheet } from 'react-native';
import Animated, { useSharedValue, useAnimatedStyle, useDerivedValue, withTiming } from 'react-native-reanimated';
import {
describe,
render,
expect,
getTestComponent,
test,
wait,
useTestRef,
} from '../../../ReanimatedRuntimeTestsRunner/RuntimeTestsApi';
import { ComparisonMode } from '../../../ReanimatedRuntimeTestsRunner/types';
import { describe, render, expect, getTestComponent, test, wait, useTestRef } from '../../../ReJest/RuntimeTestsApi';
import { ComparisonMode } from '../../../ReJest/types';

const COMPONENT_REF_ARRAY = ['zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine'];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import {
getRegisteredValue,
Presets,
clearRenderOutput,
} from '../../ReanimatedRuntimeTestsRunner/RuntimeTestsApi';
import { ComparisonMode } from '../../ReanimatedRuntimeTestsRunner/types';
} from '../../ReJest/RuntimeTestsApi';
import { ComparisonMode } from '../../ReJest/types';

const SHARED_VALUE_REF = 'SHARED_VALUE_REF';
const DOUBLED_SHARED_VALUE_REF = 'SHARED_VALUE_REF';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
recordAnimationUpdates,
render,
waitForAnimationUpdates,
} from '../../../ReanimatedRuntimeTestsRunner/RuntimeTestsApi';
} from '../../../ReJest/RuntimeTestsApi';
import { ColorSnapshots as Snapshots } from './entering.snapshot';

const AnimatedComponent = ({ fromColor, toColor }: { fromColor: string; toColor: string }) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ import {
mockWindowDimensions,
unmockWindowDimensions,
waitForAnimationUpdates,
} from '../../../ReanimatedRuntimeTestsRunner/RuntimeTestsApi';
} from '../../../ReJest/RuntimeTestsApi';
import {
DurationEnteringSnapshots,
NoModifierEnteringSnapshots,
Expand Down
Loading