From 88785d62d848544444b5652f2e4a60976b2db0d7 Mon Sep 17 00:00:00 2001 From: Tim Klever Date: Thu, 8 Oct 2020 19:43:49 -0700 Subject: [PATCH] Add test coverage around EmpasizedNode (#624) Signed-off-by: Tim Klever Signed-off-by: vvvprabhakar --- .../components/common/EmphasizedNode.test.js | 35 +++++++++++++++++++ .../__snapshots__/EmphasizedNode.test.js.snap | 28 +++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 packages/jaeger-ui/src/components/common/EmphasizedNode.test.js create mode 100644 packages/jaeger-ui/src/components/common/__snapshots__/EmphasizedNode.test.js.snap diff --git a/packages/jaeger-ui/src/components/common/EmphasizedNode.test.js b/packages/jaeger-ui/src/components/common/EmphasizedNode.test.js new file mode 100644 index 0000000000..02c1a48d8f --- /dev/null +++ b/packages/jaeger-ui/src/components/common/EmphasizedNode.test.js @@ -0,0 +1,35 @@ +// Copyright (c) 2020 The Jaeger Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import React from 'react'; +import { shallow } from 'enzyme'; +import EmphasizedNode from './EmphasizedNode'; + +describe('', () => { + let wrapper; + let defaultProps; + + beforeEach(() => { + defaultProps = { + height: 100, + width: 500, + }; + + wrapper = shallow(); + }); + + it('renders with default props', () => { + expect(wrapper).toMatchSnapshot(); + }); +}); diff --git a/packages/jaeger-ui/src/components/common/__snapshots__/EmphasizedNode.test.js.snap b/packages/jaeger-ui/src/components/common/__snapshots__/EmphasizedNode.test.js.snap new file mode 100644 index 0000000000..15ad71c978 --- /dev/null +++ b/packages/jaeger-ui/src/components/common/__snapshots__/EmphasizedNode.test.js.snap @@ -0,0 +1,28 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[` renders with default props 1`] = ` + + + + + + +`;