Apply prettier formatting
This commit is contained in:
parent
1cac306093
commit
526645c791
1576 changed files with 65385 additions and 62478 deletions
|
@ -14,43 +14,43 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { render, RenderResult } from '@testing-library/react';
|
||||
import React from "react";
|
||||
import { render, RenderResult } from "@testing-library/react";
|
||||
|
||||
import { MapError, MapErrorProps } from '../../../../src/components/views/location/MapError';
|
||||
import { LocationShareError } from '../../../../src/utils/location';
|
||||
import { MapError, MapErrorProps } from "../../../../src/components/views/location/MapError";
|
||||
import { LocationShareError } from "../../../../src/utils/location";
|
||||
|
||||
describe('<MapError />', () => {
|
||||
describe("<MapError />", () => {
|
||||
const defaultProps = {
|
||||
onFinished: jest.fn(),
|
||||
error: LocationShareError.MapStyleUrlNotConfigured,
|
||||
className: 'test',
|
||||
className: "test",
|
||||
};
|
||||
const getComponent = (props: Partial<MapErrorProps> = {}): RenderResult =>
|
||||
render(<MapError {...defaultProps} {...props} />);
|
||||
|
||||
it('renders correctly for MapStyleUrlNotConfigured', () => {
|
||||
it("renders correctly for MapStyleUrlNotConfigured", () => {
|
||||
const { container } = getComponent();
|
||||
expect(container).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it('renders correctly for MapStyleUrlNotReachable', () => {
|
||||
it("renders correctly for MapStyleUrlNotReachable", () => {
|
||||
const { container } = getComponent({
|
||||
error: LocationShareError.MapStyleUrlNotReachable,
|
||||
});
|
||||
expect(container).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it('does not render button when onFinished falsy', () => {
|
||||
it("does not render button when onFinished falsy", () => {
|
||||
const { queryByText } = getComponent({
|
||||
error: LocationShareError.MapStyleUrlNotReachable,
|
||||
onFinished: undefined,
|
||||
});
|
||||
// no button
|
||||
expect(queryByText('OK')).toBeFalsy();
|
||||
expect(queryByText("OK")).toBeFalsy();
|
||||
});
|
||||
|
||||
it('applies class when isMinimised is truthy', () => {
|
||||
it("applies class when isMinimised is truthy", () => {
|
||||
const { container } = getComponent({
|
||||
isMinimised: true,
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue