Rift.IO OSM R1 Initial Submission
[osm/UI.git] / skyquake / tests / react / skyquakeRouter_test.js
1 jest.dontMock('../framework/widgets/skyquake_container/skyquakeNav');
2
3 import React from 'react';
4 import ReactDOM from 'react-dom';
5 import TestUtils from 'react-addons-test-utils';
6 import SkyquakeNav from '../framework/widgets/skyquake_container/skyquakeNav';
7 // const SkyquakeNav = require('../framework/widgets/skyquake_container/skyquakeNav');
8
9 describe('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 })