Files
superset2/superset/assets/spec/javascripts/profile/App_spec.jsx
Maxime Beauchemin 366ecefbaa Bumping the JS libs to fix the build (#2616)
* bumping the js libs

* New linting rules

* More linting

* More

* Done linting

* npm >=4.5.0

* Bumping node

* Tweaking the build

* Fixing the damn build

* Fixing the apps
2017-04-13 15:04:09 -07:00

29 lines
789 B
JavaScript

import React from 'react';
import { Col, Row, Tab } from 'react-bootstrap';
import { mount } from 'enzyme';
import { describe, it } from 'mocha';
import { expect } from 'chai';
import { user } from './fixtures';
import App from '../../../javascripts/profile/components/App';
describe('App', () => {
const mockedProps = {
user,
};
it('is valid', () => {
expect(
React.isValidElement(<App {...mockedProps} />),
).to.equal(true);
});
it('renders 2 Col', () => {
const wrapper = mount(<App {...mockedProps} />);
expect(wrapper.find(Row)).to.have.length(1);
expect(wrapper.find(Col)).to.have.length(2);
});
it('renders 4 Tabs', () => {
const wrapper = mount(<App {...mockedProps} />);
expect(wrapper.find(Tab)).to.have.length(4);
});
});