Skip to content

Commit

Permalink
Add unit tests for SpanDetail
Browse files Browse the repository at this point in the history
  • Loading branch information
tacigar committed Aug 15, 2019
1 parent 0d2bcdb commit 09c3aa6
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions zipkin-lens/src/components/TracePage/SpanDetail/SpanDetail.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/*
* Copyright 2015-2019 The OpenZipkin 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 { createMount } from '@material-ui/core/test-utils';
import { ThemeProvider } from '@material-ui/styles';

import SpanDetail from './SpanDetail';
import { theme } from '../../../colors';

// Only display the component because there is nothing to be tested.
it('<SpanDetail />', () => {
const mount = createMount();
mount(
<ThemeProvider theme={theme}>
<SpanDetail
span={{
spanId: '1',
spanName: 'spanA',
childIds: [],
serviceName: 'serviceA',
serviceNames: [],
timestamp: 10,
duration: 4,
durationStr: '4μs',
tags: [],
annotations: [],
errorType: '',
depth: 3,
width: 2,
left: 1,
}}
minHeight={50}
classes={{}}
/>
</ThemeProvider>,
);
});

0 comments on commit 09c3aa6

Please sign in to comment.