From 962b0410413800b18ced9e8adba1fa393292d4ad Mon Sep 17 00:00:00 2001 From: Adam Wudzinski Date: Thu, 11 Apr 2019 13:58:51 +0200 Subject: Shallow render generic components Add tests that check if generic components render Change-Id: I32960dfa1519a13483b6a4ec9e2eebe48c03cdbc Issue-ID: AAI-1618 Signed-off-by: awudzins --- test/generic-components/graph/ForceDirectedGraph.test.js | 11 +++++++++++ test/generic-components/graph/Link.test.js | 11 +++++++++++ test/generic-components/graph/Node.test.js | 11 +++++++++++ 3 files changed, 33 insertions(+) create mode 100644 test/generic-components/graph/ForceDirectedGraph.test.js create mode 100644 test/generic-components/graph/Link.test.js create mode 100644 test/generic-components/graph/Node.test.js (limited to 'test/generic-components/graph') diff --git a/test/generic-components/graph/ForceDirectedGraph.test.js b/test/generic-components/graph/ForceDirectedGraph.test.js new file mode 100644 index 0000000..d73a6cc --- /dev/null +++ b/test/generic-components/graph/ForceDirectedGraph.test.js @@ -0,0 +1,11 @@ +import React from 'react'; +import ForceDirectedGraph from 'generic-components/graph/ForceDirectedGraph.jsx'; +import {shallow} from 'enzyme'; + +describe('ForceDirectedGraph component', () => { + it('should be rendered', () => { + const component = shallow(); + + expect(component).toHaveLength(1); + }); +}); diff --git a/test/generic-components/graph/Link.test.js b/test/generic-components/graph/Link.test.js new file mode 100644 index 0000000..c030ef3 --- /dev/null +++ b/test/generic-components/graph/Link.test.js @@ -0,0 +1,11 @@ +import React from 'react'; +import Link from 'generic-components/graph/Link.jsx'; +import {shallow} from 'enzyme'; + +describe('Link component', () => { + it('should be rendered', () => { + const component = shallow(); + + expect(component).toHaveLength(1); + }); +}); diff --git a/test/generic-components/graph/Node.test.js b/test/generic-components/graph/Node.test.js new file mode 100644 index 0000000..ed0c84e --- /dev/null +++ b/test/generic-components/graph/Node.test.js @@ -0,0 +1,11 @@ +import React from 'react'; +import Node from 'generic-components/graph/Node.jsx'; +import {shallow} from 'enzyme'; + +describe('Node component', () => { + it('should be rendered', () => { + const component = shallow(); + + expect(component).toHaveLength(1); + }); +}); -- cgit 1.2.3-korg