Files
react-native/Libraries/LogBox/UI/__tests__/LogBoxInspectorSection-test.js
T
Rick Hanlon a9ffad446a LogBox - Better design for stacks
Summary:
This diff makes minor style improvements and refactors to stack frame displays, primarily:
- Adding brackets around react components
- Uses a monospace font for the code
- Changing section titles to "Components" and "Call stack"
- Refactors the section headers to a single component and reduces the text size of headings
- Removes the query string from unsymbolicated stacks

Changelog: [Internal]

Reviewed By: cpojer

Differential Revision: D18433487

fbshipit-source-id: 7914b5810a4303e9a0d52def92e524b9e72f79ed
2019-11-11 16:12:44 -08:00

42 lines
1.0 KiB
JavaScript

/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
* @emails oncall+react_native
* @flow
*/
'use strict';
const React = require('react');
import Text from '../../../Text/Text';
const LogBoxInspectorSection = require('../LogBoxInspectorSection').default;
const render = require('../../../../jest/renderer');
describe('LogBoxInspectorSection', () => {
it('should render with only heading', () => {
const output = render.shallowRender(
<LogBoxInspectorSection heading="Test Section">
<Text>Child</Text>
</LogBoxInspectorSection>,
);
expect(output).toMatchSnapshot();
});
it('should render with action on the right', () => {
const output = render.shallowRender(
<LogBoxInspectorSection
heading="Test Section"
action={<Text>Right</Text>}>
<Text>Child</Text>
</LogBoxInspectorSection>,
);
expect(output).toMatchSnapshot();
});
});