zipkin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From unknown ...@apache.org>
Subject [incubator-zipkin] 08/09: Add a simple unit test for MiniTimelineGraph
Date Thu, 09 May 2019 04:52:52 GMT
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.lhound@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);
+  });
+});


Mime
View raw message