Skip to content

Commit

Permalink
Animated: Remove Animated.__PropsOnlyForTests
Browse files Browse the repository at this point in the history
Summary:
Deletes `Animated.__PropsOnlyForTests` because it is unnecessary for actually testing `AnimatedProps`.

Changelog:
[General][Removed] - Removed `Animated.__PropsOnlyForTests`.

Reviewed By: kacieb

Differential Revision: D28271629

fbshipit-source-id: 7d4c83d72f7298ed43e3659126cb45d271c5dac7
  • Loading branch information
yungsters authored and facebook-github-bot committed May 8, 2021
1 parent bf8037c commit ae4946f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 0 additions & 2 deletions Libraries/Animated/AnimatedImplementation.js
Original file line number Diff line number Diff line change
Expand Up @@ -706,6 +706,4 @@ module.exports = {
* Expose Event class, so it can be used as a type for type checkers.
*/
Event: AnimatedEvent,

__PropsOnlyForTests: AnimatedProps,
};
1 change: 0 additions & 1 deletion Libraries/Animated/AnimatedMock.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,5 +152,4 @@ module.exports = {
forkEvent: AnimatedImplementation.forkEvent,
unforkEvent: AnimatedImplementation.unforkEvent,
Event: AnimatedEvent,
__PropsOnlyForTests: AnimatedProps,
};
8 changes: 5 additions & 3 deletions Libraries/Animated/__tests__/Animated-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
* @emails oncall+react_native
*/

import AnimatedProps from '../nodes/AnimatedProps';
import TestRenderer from 'react-test-renderer';
import * as React from 'react';

Expand All @@ -21,6 +22,7 @@ jest.mock('../../BatchedBridge/NativeModules', () => ({
}));

let Animated = require('../Animated');

describe('Animated tests', () => {
beforeEach(() => {
jest.resetModules();
Expand All @@ -32,7 +34,7 @@ describe('Animated tests', () => {

const callback = jest.fn();

const node = new Animated.__PropsOnlyForTests(
const node = new AnimatedProps(
{
style: {
backgroundColor: 'red',
Expand Down Expand Up @@ -786,7 +788,7 @@ describe('Animated tests', () => {

const callback = jest.fn();

const node = new Animated.__PropsOnlyForTests(
const node = new AnimatedProps(
{
style: {
opacity: vec.x.interpolate({
Expand Down Expand Up @@ -890,7 +892,7 @@ describe('Animated tests', () => {
const value3 = new Animated.Value(0);
const value4 = Animated.add(value3, Animated.multiply(value1, value2));
const callback = jest.fn();
const view = new Animated.__PropsOnlyForTests(
const view = new AnimatedProps(
{
style: {
transform: [
Expand Down

0 comments on commit ae4946f

Please sign in to comment.