Skip to content
This repository was archived by the owner on Jul 30, 2020. It is now read-only.

Commit 3f58e66

Browse files
author
Brandon Carroll
committed
chore: prepare release candidate
1 parent 9eac5ba commit 3f58e66

File tree

5 files changed

+9
-11
lines changed

5 files changed

+9
-11
lines changed

examples/__tests__/react-intl.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const renderWithReactIntl = component => {
3939
setupTests();
4040

4141
test('it should render FormattedDate and have a formatted pt date', () => {
42-
const { testRenderer } = renderWithReactIntl(<FormatDateView />);
42+
const { container } = renderWithReactIntl(<FormatDateView />);
4343

44-
getByText(testRenderer, '11/03/2019');
44+
getByText(container, '11/03/2019');
4545
});

src/__tests__/__snapshots__/fetch.js.snap

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ exports[`Fetch makes an API call and displays the greeting when load-greeting is
44
<View>
55
<TouchableOpacity
66
activeOpacity={0.2}
7-
onPress={[Function]}
87
>
98
<Text>
109
Fetch

src/__tests__/fetch.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React from 'react';
22
import 'jest-native/extend-expect';
33
import { TouchableOpacity, Text, View } from 'react-native';
44

5-
import { render, fireEvent, wait } from '../';
5+
import { render, fireEvent, toJSON, wait } from '../';
66

77
global.fetch = require('jest-fetch-mock');
88

@@ -34,7 +34,7 @@ class Fetch extends React.Component {
3434
test('Fetch makes an API call and displays the greeting when load-greeting is clicked', async () => {
3535
fetch.mockResponseOnce(JSON.stringify({ data: { greeting: 'hello there' } }));
3636
const url = '/greeting';
37-
const { testRenderer, getByText } = render(<Fetch url={url} />);
37+
const { container, getByText } = render(<Fetch url={url} />);
3838

3939
fireEvent.press(getByText('Fetch'));
4040

@@ -44,5 +44,5 @@ test('Fetch makes an API call and displays the greeting when load-greeting is cl
4444
expect(fetch).toHaveBeenCalledWith(url);
4545

4646
expect(getByText('hello there')).toHaveTextContent('hello there');
47-
expect(testRenderer).toMatchSnapshot();
47+
expect(toJSON(container)).toMatchSnapshot();
4848
});

src/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ function render(ui, { options = {}, wrapper: WrapperComponent, queries } = {}) {
2222
});
2323

2424
return {
25-
testRenderer,
2625
container: proxyUnsafeProperties(testRenderer.root),
2726
debug: (el = testRenderer.root) => console.log(prettyPrint(toJSON(el))),
2827
unmount: () => testRenderer.unmount(),

src/lib/__tests__/misc.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@ import { Picker, View } from 'react-native';
44
import { fireEvent, render, queryByProp, queryByTestId } from '../../';
55

66
test('queryByProp', () => {
7-
const { testRenderer } = render(
7+
const { container } = render(
88
<View>
99
<View testID="foo" importantForAccessibility="no" />
1010
<View importantForAccessibility="no" />
1111
<View importantForAccessibility="no-hide-descendants" />
1212
</View>,
1313
);
1414

15-
expect(queryByTestId(testRenderer, 'foo')).not.toBeNull();
16-
expect(queryByProp('importantForAccessibility', testRenderer, 'auto')).toBeNull();
17-
expect(() => queryByProp('importantForAccessibility', testRenderer, /no/)).toThrow(
15+
expect(queryByTestId(container, 'foo')).not.toBeNull();
16+
expect(queryByProp('importantForAccessibility', container, 'auto')).toBeNull();
17+
expect(() => queryByProp('importantForAccessibility', container, /no/)).toThrow(
1818
/multiple elements/,
1919
);
2020
});

0 commit comments

Comments
 (0)