You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zipkin.apache.org by unknown <""...@apache.org> on 2019/05/09 04:52:52 UTC
[incubator-zipkin] 08/09: Add a simple unit test for
MiniTimelineGraph
This is an automated email from the ASF dual-hosted git repository.
(unknown) pushed a commit to branch mini-timeline
in repository https://gitbox.apache.org/repos/asf/incubator-zipkin.git
commit 01e1d0b2372ec702a7dab178169828f718427e56
Author: tacigar <ig...@gmail.com>
AuthorDate: Thu May 9 13:50:23 2019 +0900
Add a simple unit test for MiniTimelineGraph
---
.../MiniTimeline/MiniTimelineGraph.test.js | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/zipkin-lens/src/components/MiniTimeline/MiniTimelineGraph.test.js b/zipkin-lens/src/components/MiniTimeline/MiniTimelineGraph.test.js
new file mode 100644
index 0000000..d082ea7
--- /dev/null
+++ b/zipkin-lens/src/components/MiniTimeline/MiniTimelineGraph.test.js
@@ -0,0 +1,21 @@
+import React from 'react';
+import { shallow } from 'enzyme';
+
+import MiniTimelineGraph from './MiniTimelineGraph';
+
+// TODO: need more tests.
+describe('<MiniTimelineGraph />', () => {
+ it('should be rendered', () => {
+ const wrapper = shallow(
+ <MiniTimelineGraph
+ spans={[]}
+ startTs={0}
+ endTs={10}
+ duration={10}
+ onStartAndEndTsChange={jest.fn()}
+ numTimeMarkers={5}
+ />,
+ );
+ expect(wrapper.find('.mini-timeline-graph').length).toBe(1);
+ });
+});