/**
* 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');
const LogBoxMessage = require('../LogBoxMessage').default;
const render = require('../../../../jest/renderer');
describe('LogBoxMessage', () => {
it('should render message', () => {
const output = render.shallowRender(
,
);
expect(output).toMatchSnapshot();
});
it('should render message with substitution', () => {
const output = render.shallowRender(
,
);
expect(output).toMatchSnapshot();
});
it('should render a plaintext message with no substitutions', () => {
const output = render.shallowRender(
,
);
expect(output).toMatchSnapshot();
});
it('Should strip "Warning: " without breaking substitution', () => {
const output = render.shallowRender(
,
);
expect(output).toMatchSnapshot();
});
it('Should strip "Warning: Warning: " without breaking substitution', () => {
const output = render.shallowRender(
,
);
expect(output).toMatchSnapshot();
});
});