mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-05-03 07:14:59 +08:00
reapply TextInput es6 conversion with fixes, attemps to fix
Summary: D10515754 reapplied by backing out D12989604 and then fixed by manually forwarding the instance methods to the host function instead of using `forwardRef`. This also removes the need for the $flowFixMe. Reviewed By: TheSavior Differential Revision: D13048482 fbshipit-source-id: ff2447aff123e0960eddaef645f7dc976a426e14
This commit is contained in:
committed by
Facebook Github Bot
parent
a00940693e
commit
9ea1295179
@@ -12,12 +12,11 @@
|
||||
'use strict';
|
||||
|
||||
const React = require('React');
|
||||
const ReactTestRenderer = require('react-test-renderer');
|
||||
const TextInput = require('TextInput');
|
||||
|
||||
import Component from '@reactions/component';
|
||||
|
||||
const {enter} = require('ReactNativeTestTools');
|
||||
const {enter, renderWithStrictMode} = require('ReactNativeTestTools');
|
||||
|
||||
jest.unmock('TextInput');
|
||||
|
||||
@@ -29,7 +28,7 @@ describe('TextInput tests', () => {
|
||||
beforeEach(() => {
|
||||
onChangeListener = jest.fn();
|
||||
onChangeTextListener = jest.fn();
|
||||
const renderTree = ReactTestRenderer.create(
|
||||
const renderTree = renderWithStrictMode(
|
||||
<Component initialState={{text: initialValue}}>
|
||||
{({setState, state}) => (
|
||||
<TextInput
|
||||
|
||||
Reference in New Issue
Block a user