Skip to content

Commit

Permalink
Add test coverage around EmpasizedNode (jaegertracing#624)
Browse files Browse the repository at this point in the history
Signed-off-by: Tim Klever <Tim.V.Klever@aexp.com>
Signed-off-by: vvvprabhakar <vvvprabhakar@gmail.com>
  • Loading branch information
tklever committed Oct 9, 2020
1 parent 07fc5b5 commit 88785d6
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 0 deletions.
35 changes: 35 additions & 0 deletions packages/jaeger-ui/src/components/common/EmphasizedNode.test.js
Original file line number Diff line number Diff line change
@@ -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('<EmphasizedNode>', () => {
let wrapper;
let defaultProps;

beforeEach(() => {
defaultProps = {
height: 100,
width: 500,
};

wrapper = shallow(<EmphasizedNode {...defaultProps} />);
});

it('renders with default props', () => {
expect(wrapper).toMatchSnapshot();
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`<EmphasizedNode> renders with default props 1`] = `
<Fragment>
<rect
className="EmphasizedNode--contrast is-non-scaling"
height={100}
vectorEffect="non-scaling-stroke"
width={500}
/>
<rect
className="EmphasizedNode--contrast is-scaling"
height={100}
width={500}
/>
<rect
className="EmphasizedNode is-non-scaling"
height={100}
vectorEffect="non-scaling-stroke"
width={500}
/>
<rect
className="EmphasizedNode is-scaling"
height={100}
width={500}
/>
</Fragment>
`;

0 comments on commit 88785d6

Please sign in to comment.