const bootstrap = require('react-bootstrap'),
      NavBar = require('../../components/NavBar.js'),
      React = require('react/addons'),
      skinDeep = require('skin-deep');

require('chai').should();

describe('NavBar', function () {
  let tree, vdom;

  beforeEach(function () {
    tree = skinDeep.shallowRender(
        <NavBar/>
    );

    vdom = tree.getRenderOutput();
  });

  it('should render', function () {
    const text = tree
            .findNode('Navbar')
            .props
            .brand
            .props
            .children;

    vdom.type.should.equal(bootstrap.Navbar);
    text.should.not.be.empty;
  });
});

const bootstrap = require('react-bootstrap'),
      jsdom = require('mocha-jsdom'),
      NavBar = require('../../components/NavBar.js'),
      React = require('react/addons'),
      TestUtils = React.addons.TestUtils;

require('chai').should();

describe('NavBar', function () {
  jsdom();

  let navBar;
  beforeEach(function () {
    navBar = TestUtils.renderIntoDocument(
      <NavBar/>
    );
  });

  it('should render', function () {
    const brand = TestUtils.findRenderedComponentWithType(navBar, bootstrap.Navbar);
    React.findDOMNode(brand).textContent.should.not.be.empty;
  });
});

Refactor NavBar test