blob: 0c65bbd93b093b74df1a3f94c7ff79c1e7e7f1f8 [file] [log] [blame]
Jeremy Mordkoffe29efc32016-09-07 18:59:17 -04001jest.dontMock('../framework/widgets/skyquake_container/skyquakeNav');
2
3import React from 'react';
4import ReactDOM from 'react-dom';
5import TestUtils from 'react-addons-test-utils';
6import SkyquakeNav from '../framework/widgets/skyquake_container/skyquakeNav';
7// const SkyquakeNav = require('../framework/widgets/skyquake_container/skyquakeNav');
8
9describe('SkyquakeNav', () => {
10
11 let exampleRoutes = [{
12 "label": "Hello World Component 1",
13 "route": "/helloworld/#hello",
14 "component": "./helloWorldOne.jsx",
15 "path": "",
16 "type": "internal",
17 "isExternal": true
18 }];
19 let node;
20 beforeEach(function() {
21 node = document.createElement('div')
22 });
23 describe('returnLinkItem', () => {
24 let element;
25 beforeEach(function() {
26 element = SkyquakeNav.returnLinkItem(exampleRoutes[0]);
27 });
28 it('Returns an <a> tag when external', () => {
29 ReactDOM.render(element, node, function() {
30 expect(node.tagName == "A";
31 })
32 })
33 })
34})