mirror of
https://github.com/callstack/react-native-testing-library.git
synced 2026-09-18 23:09:04 +08:00
chore: bump React Native to 0.60 (#204)
This commit is contained in:
committed by
GitHub
parent
b8fb6b5615
commit
1382a3d7f6
@@ -14,7 +14,9 @@ exports[`debug 1`] = `
|
||||
exports[`debug.deep 1`] = `
|
||||
"<View
|
||||
accessible={true}
|
||||
clickable={true}
|
||||
isTVSelectable={true}
|
||||
onClick={[Function bound touchableHandlePress]}
|
||||
onResponderGrant={[Function bound touchableHandleResponderGrant]}
|
||||
onResponderMove={[Function bound touchableHandleResponderMove]}
|
||||
onResponderRelease={[Function bound touchableHandleResponderRelease]}
|
||||
@@ -36,7 +38,9 @@ exports[`debug.deep 1`] = `
|
||||
exports[`debug.deep async test 1`] = `
|
||||
"<View
|
||||
accessible={true}
|
||||
clickable={true}
|
||||
isTVSelectable={true}
|
||||
onClick={[Function bound touchableHandlePress]}
|
||||
onResponderGrant={[Function bound touchableHandleResponderGrant]}
|
||||
onResponderMove={[Function bound touchableHandleResponderMove]}
|
||||
onResponderRelease={[Function bound touchableHandleResponderRelease]}
|
||||
|
||||
@@ -28,7 +28,9 @@ exports[`debug 1`] = `
|
||||
/>
|
||||
<View
|
||||
accessible={true}
|
||||
clickable={true}
|
||||
isTVSelectable={true}
|
||||
onClick={[Function bound touchableHandlePress]}
|
||||
onResponderGrant={[Function bound touchableHandleResponderGrant]}
|
||||
onResponderMove={[Function bound touchableHandleResponderMove]}
|
||||
onResponderRelease={[Function bound touchableHandleResponderRelease]}
|
||||
@@ -86,7 +88,9 @@ exports[`debug changing component: bananaFresh button message should now be "fre
|
||||
/>
|
||||
<View
|
||||
accessible={true}
|
||||
clickable={true}
|
||||
isTVSelectable={true}
|
||||
onClick={[Function bound touchableHandlePress]}
|
||||
onResponderGrant={[Function bound touchableHandleResponderGrant]}
|
||||
onResponderMove={[Function bound touchableHandleResponderMove]}
|
||||
onResponderRelease={[Function bound touchableHandleResponderRelease]}
|
||||
@@ -238,7 +242,9 @@ exports[`debug: with message 1`] = `
|
||||
/>
|
||||
<View
|
||||
accessible={true}
|
||||
clickable={true}
|
||||
isTVSelectable={true}
|
||||
onClick={[Function bound touchableHandlePress]}
|
||||
onResponderGrant={[Function bound touchableHandleResponderGrant]}
|
||||
onResponderMove={[Function bound touchableHandleResponderMove]}
|
||||
onResponderRelease={[Function bound touchableHandleResponderRelease]}
|
||||
@@ -271,7 +277,9 @@ exports[`debug: with message 1`] = `
|
||||
exports[`toJSON 1`] = `
|
||||
<View
|
||||
accessible={true}
|
||||
clickable={false}
|
||||
isTVSelectable={true}
|
||||
onClick={[Function]}
|
||||
onResponderGrant={[Function]}
|
||||
onResponderMove={[Function]}
|
||||
onResponderRelease={[Function]}
|
||||
|
||||
@@ -1,15 +1,11 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`shallow rendering React Test Instance 1`] = `
|
||||
<TouchableText
|
||||
accessible={true}
|
||||
allowFontScaling={true}
|
||||
ellipsizeMode="tail"
|
||||
forwardedRef={null}
|
||||
<Text
|
||||
testID="text-button"
|
||||
>
|
||||
Press me
|
||||
</TouchableText>
|
||||
</Text>
|
||||
`;
|
||||
|
||||
exports[`shallow rendering React elements 1`] = `
|
||||
|
||||
@@ -36,12 +36,12 @@ test('debug', () => {
|
||||
const component = <Button onPress={jest.fn} text="Press me" />;
|
||||
debug(component);
|
||||
|
||||
const output = (console.log: ConsoleLogMock).mock.calls[0][0];
|
||||
const output = ((console.log: any): ConsoleLogMock).mock.calls[0][0];
|
||||
|
||||
expect(stripAnsi(output)).not.toEqual(output);
|
||||
expect(stripAnsi(output)).toMatchSnapshot();
|
||||
|
||||
(console.log: ConsoleLogMock).mockReset();
|
||||
((console.log: any): ConsoleLogMock).mockReset();
|
||||
|
||||
debug(component, 'test message');
|
||||
|
||||
@@ -58,12 +58,12 @@ test('debug.deep', () => {
|
||||
const component = <Button onPress={jest.fn} text="Press me" />;
|
||||
debug.deep(component);
|
||||
|
||||
const output = (console.log: ConsoleLogMock).mock.calls[0][0];
|
||||
const output = ((console.log: any): ConsoleLogMock).mock.calls[0][0];
|
||||
|
||||
expect(stripAnsi(output)).not.toEqual(output);
|
||||
expect(stripAnsi(output)).toMatchSnapshot();
|
||||
|
||||
(console.log: ConsoleLogMock).mockReset();
|
||||
((console.log: any): ConsoleLogMock).mockReset();
|
||||
|
||||
debug.deep(component, 'test message');
|
||||
|
||||
@@ -82,7 +82,7 @@ test('debug.deep async test', async () => {
|
||||
|
||||
debug.deep(toJSON());
|
||||
|
||||
const output = (console.log: ConsoleLogMock).mock.calls[0][0];
|
||||
const output = ((console.log: any): ConsoleLogMock).mock.calls[0][0];
|
||||
|
||||
expect(stripAnsi(output)).toMatchSnapshot();
|
||||
});
|
||||
|
||||
@@ -326,7 +326,7 @@ test('debug', () => {
|
||||
debug.shallow('my other custom message');
|
||||
|
||||
// eslint-disable-next-line no-console
|
||||
const mockCalls = (console.log: ConsoleLogMock).mock.calls;
|
||||
const mockCalls = ((console.log: any): ConsoleLogMock).mock.calls;
|
||||
|
||||
expect(stripAnsi(mockCalls[0][0])).toMatchSnapshot();
|
||||
expect(stripAnsi(mockCalls[1][0] + mockCalls[1][1])).toMatchSnapshot(
|
||||
@@ -348,7 +348,7 @@ test('debug changing component', () => {
|
||||
debug();
|
||||
|
||||
// eslint-disable-next-line no-console
|
||||
const mockCalls = (console.log: ConsoleLogMock).mock.calls;
|
||||
const mockCalls = ((console.log: any): ConsoleLogMock).mock.calls;
|
||||
|
||||
expect(stripAnsi(mockCalls[4][0])).toMatchSnapshot(
|
||||
'bananaFresh button message should now be "fresh"'
|
||||
|
||||
@@ -10,9 +10,7 @@ export class ErrorWithStack extends Error {
|
||||
|
||||
export const createLibraryNotSupportedError = (error: Error) =>
|
||||
new Error(
|
||||
`Currently the only supported library to search by text is "react-native".\n\n${
|
||||
error.message
|
||||
}`
|
||||
`Currently the only supported library to search by text is "react-native".\n\n${error.message}`
|
||||
);
|
||||
|
||||
const warned = {
|
||||
|
||||
Reference in New Issue
Block a user